//Pascal ABC.NET v3.1 сборка 1219
Const
n=5;
Var
ar:array[1..n] of real;
i,k:integer;
begin
randomize;
writeln('Array:');
for i:=1 to n do
begin
ar[i]:=random(3);
write(ar[i]:6);
end;
for i:=1 to n-1 do
if ar[i]=ar[i+1] then k:=k+1;
writeln;
writeln('Res=',k);
end.