Var ma:array[1..n,1..m] of integer; i,j,min:integer; begin for i:=1 to n do begin min:=integer.MaxValue; for j:=1 to m do begin readln(ma[i,j]); if ma[i,j]<min then min:=ma[i,j]; end; for j:=1 to m do if ma[i,j]=min then ma[i,j]:=0; end; writeln('Final matrix:'); for i:=1 to n do begin for j:=1 to m do write(ma[i,j]:4); writeln; end; end.
Const
n=3;
m=2;
Var
ma:array[1..n,1..m] of integer;
i,j,min:integer;
begin
for i:=1 to n do
begin
min:=integer.MaxValue;
for j:=1 to m do
begin
readln(ma[i,j]);
if ma[i,j]<min then min:=ma[i,j];
end;
for j:=1 to m do
if ma[i,j]=min then ma[i,j]:=0;
end;
writeln('Final matrix:');
for i:=1 to n do
begin
for j:=1 to m do
write(ma[i,j]:4);
writeln;
end;
end.