const NN=50; var a:array [1..NN,1..NN] of integer; i,j,m,n:integer; begin write('Введите n: '); readln(n); write('Введите m: '); readln(m); for i:= 1 to n do for j:= 1 to m do readln(a[i,j]); for i:= 1 to n do for j:= 1 to m do if a[i,j] mod 2 =0 then a[i,j]:=a[i,j] div 2; for i:= 1 to n do begin for j:= 1 to m do write(a[i,j],' '); writeln; end; end.
const NN=50;
var
a:array [1..NN,1..NN] of integer;
i,j,m,n:integer;
begin
write('Введите n: ');
readln(n);
write('Введите m: ');
readln(m);
for i:= 1 to n do
for j:= 1 to m do
readln(a[i,j]);
for i:= 1 to n do
for j:= 1 to m do
if a[i,j] mod 2 =0 then a[i,j]:=a[i,j] div 2;
for i:= 1 to n do
begin
for j:= 1 to m do
write(a[i,j],' ');
writeln;
end;
end.