const g=5;v=10;
var i,j,s,m,mi:integer;
a:array [1..g,1..v] of integer;
begin
for i:=1 to g do
for j:=1 to v do
a[i,j]:=random(11);
if i=1 then s:=s+a[i,j];
write (a[i,j]:3)
end;
writeln
writeln;
m:=s;
mi:=1;
s:=0;
for j:=1 to v do s:=s+a[i,j];
if s>m then
mi:=i
end
if i=mi then a[i,j]:=0;
end.
const g=5;v=10;
var i,j,s,m,mi:integer;
a:array [1..g,1..v] of integer;
begin
for i:=1 to g do
begin
for j:=1 to v do
begin
a[i,j]:=random(11);
if i=1 then s:=s+a[i,j];
write (a[i,j]:3)
end;
writeln
end;
writeln;
writeln;
m:=s;
mi:=1;
for i:=1 to g do
begin
s:=0;
for j:=1 to v do s:=s+a[i,j];
if s>m then
begin
m:=s;
mi:=i
end
end;
for i:=1 to g do
begin
for j:=1 to v do
begin
if i=mi then a[i,j]:=0;
write (a[i,j]:3)
end;
writeln
end;
end.