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.
ответ:
103 105 107 109 111 113 115 117 119 121 123 124 125 127 129 131 133 135 137 139 141 143 145 147 149 150 и т. д. через 1-о число
объяснение: