I,j,k:integer;
begin
for i:=1 to n do begin
for j:=1 to m do begin
a[i,j]:=random(21)-10;
write(a[i,j]:4);
end;
writeln;
end;
for i:=1 to n do
for j:=1 to m do
if a[i,j]mod 2<>0 then k:=k+1;
writeln('Количество нечетных ',k);
end.
Тестовое решение:
10 -1 -1 3 5 -3 -6 -1 2 8
-5 -5 -3 -1 3 -8 -1 -1 -6 -2
2 -3 5 0 -1 -4 0 3 7 -8
-6 5 6 3 -8 -6 -4 10 -3 0
-5 -4 2 -6 -10 -2 -1 3 5 -7
2 -10 2 10 -8 2 4 9 -6 -1
7 1 3 -1 3 0 0 4 -3 -1
7 -1 -8 4 -8 -5 6 1 0 -9
7 8 9 3 0 -6 -8 6 0 0
0 -3 6 8 4 4 4 -8 1 0
Количество нечетных 45