Var a:array [1..5,1..5] of integer; b:array [1..5] of integer; i,j:integer; begin randomize; writeln('двумерный массив:'); for i:=1 to 5 do begin for j:=1 to 5 do begin a[i,j]:=random(18)-9; write(a[i,j]:4); end; writeln; end; writeln('одномерный массив:'); for i:=1 to 5 do for j:=1 to 5 do if (a[i,j]<0)and((a[i,j] mod 2)<>0) then b[i]:=b[i]+1; for i:=1 to 5 do writeln(b[i]); end.
a:array [1..5,1..5] of integer;
b:array [1..5] of integer;
i,j:integer;
begin
randomize;
writeln('двумерный массив:');
for i:=1 to 5 do
begin
for j:=1 to 5 do
begin
a[i,j]:=random(18)-9;
write(a[i,j]:4);
end;
writeln;
end;
writeln('одномерный массив:');
for i:=1 to 5 do
for j:=1 to 5 do
if (a[i,j]<0)and((a[i,j] mod 2)<>0) then b[i]:=b[i]+1;
for i:=1 to 5 do
writeln(b[i]);
end.