Const
n=10;
Var
ar:array[1..n] of integer;
k,i:integer;
begin
randomize;
writeln('Array:');
for i:=1 to n do
begin
ar[i]:=random(-1,1);
write(ar[i]:4);
end;
writeln;
for i:=1 to n-1 do
if ((ar[i]>0) and (ar[i+1]<0)) or ((ar[i]<0) and (ar[i+1]>0)) then
begin
writeln(ar[i],' ',ar[i+1]);
k:=k+1;
end;
writeln('Всего:',k);
end.