Const N = 10; Var A:array[1..N,1..N] of integer; i,j:integer; S:array[1..N] of real; Begin Randomize; WriteLn('Исходный массив:'); For i:= 1 to N do Begin S[i]:=0; For j:= 1 to N do Begin A[i,j]:=random(21)-10; Write(A[i,j]:3,' '); S[i]:=S[i]+A[i,j] End; WriteLn(' S[',i,'] = ',S[i]) End; j:=1; For i:= 1 to N do if S[i]>S[j] then j:=i; WriteLn('Max(S) = S[',j,'] = ',S[j]); End.
N = 10;
Var
A:array[1..N,1..N] of integer;
i,j:integer;
S:array[1..N] of real;
Begin
Randomize;
WriteLn('Исходный массив:');
For i:= 1 to N do
Begin
S[i]:=0;
For j:= 1 to N do
Begin
A[i,j]:=random(21)-10;
Write(A[i,j]:3,' ');
S[i]:=S[i]+A[i,j]
End;
WriteLn(' S[',i,'] = ',S[i])
End;
j:=1;
For i:= 1 to N do
if S[i]>S[j] then j:=i;
WriteLn('Max(S) = S[',j,'] = ',S[j]);
End.