Program n1;
const n=4; m=5;
var a: array[1..n,1..m] of integer;
i,j: integer;
begin
writeln('исходная матрица:');
for i:=1 to n do
begin
for j:=1 to m do begin
a[i,j]:=random(20);
write(a[i,j],' ');
end;
writeln;
end;
writeln('полученная матрица:');
for i:=1 to n do
begin
for j:=1 to m do begin
if (j mod 2=0) and (i mod 2=0) then a[i,j]:=a[i,j]*a[i,j];
write(a[i,j],' ');
end;
writeln;
end;
end.