Const n = 100;
var
a: array[1..n] of real;
i,j,k: integer;
begin
writeln('Число элементов в массиве (k<=100)');<br> readln(k);
j := 0;
for i := 1 to k do
a[i] := random(101) - 50;
for i := 2 to k do
begin
if (a[i-1]>0) and (a[i]>0) or (a[i-1]*a[i]<0) then j:=j+1;<br> end;
writeln(j);
end.