Program n1; Uses CRT; Const n=5; Var a: array[1..n,1..n] of integer; s,i,j,k,s1: integer; begin For i:=1 to n do begin For j:=1 to n do begin a[i,j]:=random(11); write(a[i,j]:3); end; writeln; end; For i:=1 to n do begin For j:=1 to n do s:=s+a[i,j]; if s1<s then begin s1:=s; k:=i; end; s:=0; end; writeln('Stroka ',k,' so znacheniem ',s1,' - naibolshaya'); readln end.
Program n1;
Uses CRT;
Const n=5;
Var a: array[1..n,1..n] of integer;
s,i,j,k,s1: integer;
begin
For i:=1 to n do
begin
For j:=1 to n do
begin
a[i,j]:=random(11);
write(a[i,j]:3);
end;
writeln;
end;
For i:=1 to n do
begin
For j:=1 to n do
s:=s+a[i,j];
if s1<s then begin s1:=s; k:=i; end;
s:=0;
end;
writeln('Stroka ',k,' so znacheniem ',s1,' - naibolshaya');
readln
end.