1)program
obnulenie;
var
a:array[1..100,1..100] of longint;
n,i,j,m,k,o:longint;
begin
read(n,m);
{}for i:=1 to
n do
for j:=1 to
m do
read(a[i,j]);
for i:=1 to
n do
for j:=1 to
m do
if a[i,j]=0
then for o:=1 to
m do a[i,o]:=0;
for i:=1 to
n do
begin
for j:=1 to
m do
write(a[i,j],'
');
writeln;
end;
end.
2)
program obnulenie;
var a:array[1..100,1..100] of longint;
n,i,j,m,k:longint;
begin
read(n,m); {}
for i:=1 to n do
for j:=1 to m do
read(a[i,j]);for i:=1 to n do
begin
for j:=1 to m do
if a[i,j]=0 then begin
for k:=1 to m do
a[i,k]:=0;
end;
end;for i:=1 to n do
begin
for j:=1 to m do
write(a[i,j],' ');writeln;end;
end. 3)program zamena;
var a:array[1..100,1..100] of longint;
n,i,j,m,k,vr1,x1,x2,y1,y2,max,min:longint;
begin
read(n,m); {}
for i:=1 to n do
for j:=1 to m do
read(a[i,j]);
max:=-999999;
min:=999999;
for i:=1 to n do
begin
for j:=1 to m do
begin
if max
if min>a[i,j] then begin min:=a[i,j];x2:=i; y2:=j end;
end;
end;vr1:=a[x1-1,y1];
a[x1-1,y1]:=a[x1,y1];
a[x1,y1]:=vr1;vr1:=a[x2-1,y2];
a[x2-1,y2]:=a[x2,y2];
a[x2,y2]:=vr1;
for i:=1 to n do
begin
for j:=1 to m do
write(a[i,j]);
writeln;
end;
end.