var a: array [1..n] of integer; i, positives, negatives, zeros: integer;
begin for i := 1 to n do begin a[i] := Random(100) - 50; Write(a[i], ' '); if a[i] < 0 then negatives := negatives + 1 else if a[i] > 0 then positives := positives + 1 else zeros := zeros + 1 end; writeln;
Const N = 10; var mas: array [1..N] of integer; i, less, more, zero: integer; begin for i:=1 to N do read(mas[i]); for i:=1 to N do if mas[i]<0 then less:=less+1 else begin if mas[i]>0 then more:=more+1 else zero:=zero+1 end; writeln('Меньше 0: '+less+' Больше 0: '+more+' Равно 0: '+zero) end.
n = 20;
var
a: array [1..n] of integer;
i, positives, negatives, zeros: integer;
begin
for i := 1 to n do
begin
a[i] := Random(100) - 50;
Write(a[i], ' ');
if a[i] < 0 then
negatives := negatives + 1
else if a[i] > 0 then
positives := positives + 1
else
zeros := zeros + 1
end;
writeln;
writeln('x > 0: ', positives);
writeln('x = 0: ', zeros);
writeln('x < 0: ', negatives);
end.
var
mas: array [1..N] of integer;
i, less, more, zero: integer;
begin
for i:=1 to N do
read(mas[i]);
for i:=1 to N do
if mas[i]<0 then
less:=less+1
else begin
if mas[i]>0 then
more:=more+1
else
zero:=zero+1
end;
writeln('Меньше 0: '+less+' Больше 0: '+more+' Равно 0: '+zero)
end.