var i,j,s,n,max:integer; a:array[1..5,1..5]of integer; begin for i:=1 to 5 do begin s:=0; for j:=1 to 5 do begin a[i,j]:=random(10); write(a[i,j],' '); s:=s+a[i,j]; end; if s>max then begin n:=i; max:=s; end; writeln; end; writeln; write('Строка ',n,': '); for j:=1 to 5 do write(a[n,j],' '); end.
i,j,s,n,max:integer;
a:array[1..5,1..5]of integer;
begin
for i:=1 to 5 do
begin
s:=0;
for j:=1 to 5 do
begin
a[i,j]:=random(10);
write(a[i,j],' ');
s:=s+a[i,j];
end;
if s>max then
begin
n:=i;
max:=s;
end;
writeln;
end;
writeln;
write('Строка ',n,': ');
for j:=1 to 5 do
write(a[n,j],' ');
end.