Program n1; Uses Crt; Var c: array[1..1000] of integer; n, i, null, otric, polozhit :integer; Begin writeln('Razmer massiva = '); Readln(n);
for i:=1 to n do begin c[i]:=random(40) - 20; write(c[i]:4); end;
writeln();
otric:=0; polozhit:=0; null:=0; for i:=1 to n do begin if (c[i]<0) then otric:=otric+1; if (c[i]>0) then polozhit:=polozhit+1; if (c[i]=0) then null:=null+1; end; writeln('Kol-vo chisel < 0: ', otric); writeln('Kol-vo chisel > 0: ', polozhit); writeln('Kol-vo chisel = 0: ', null); End.
Uses Crt;
Var
c: array[1..1000] of integer;
n, i, null, otric, polozhit :integer;
Begin
writeln('Razmer massiva = '); Readln(n);
for i:=1 to n do begin
c[i]:=random(40) - 20;
write(c[i]:4);
end;
writeln();
otric:=0; polozhit:=0; null:=0;
for i:=1 to n do begin
if (c[i]<0) then otric:=otric+1;
if (c[i]>0) then polozhit:=polozhit+1;
if (c[i]=0) then null:=null+1;
end;
writeln('Kol-vo chisel < 0: ', otric);
writeln('Kol-vo chisel > 0: ', polozhit);
writeln('Kol-vo chisel = 0: ', null);
End.