uses crt;
const n=10;
var a:array[1..n] of integer;
i,j,p,k:byte;
begin
clrscr;
for i:=1 to n do
begin
a[i]:=random(100)-random(100);
write(a[i],' ');
end;
writeln;
if a[1]>0 then p:=1
else p:=0;
k:=0;
for i:=2 to n do
if (a[i]>0) and (p=0) then begin
write(' ',i);
inc(k);
p:=1;
end
else if (a[i]<0) and (p=1) then begin
write(' ',i);
inc(k);
p:=0;
end;
writeln;
writeln('Всего ',k,' раз(а)');
end.