Var i,k:integer; a:array[1..10] of integer; begin for i:=1 to 10 do begin a[i]:=random(17)-8; write(a[i]:4); end; for i:=1 to 10 do if a[i] mod 2<>0 then inc(k) else a[i]:=0; writeln; for i:=1 to 10 do write(a[i]:4); writeln; writeln('кол-во нечет=',k); end.
begin
for i:=1 to 10 do begin a[i]:=random(17)-8; write(a[i]:4); end;
for i:=1 to 10 do
if a[i] mod 2<>0 then inc(k) else a[i]:=0;
writeln;
for i:=1 to 10 do write(a[i]:4);
writeln;
writeln('кол-во нечет=',k);
end.