Program naim; const n= 4; m = 2; var a: array [1..n, 1..m] of integer; s: array [1..n] of integer; i, j, min: integer; begin for i:= 1 to n do begin s[i]:=0; for j:= 1 to m do read (a[i,j]); writeln (''); end;
for i:= 1 to n do for j:= 1 to m do s[i]:=s[i]+a[i,j];
j:=1; min:=s[1]; for i:= 2 to n do if s[i]<min then begin min:= s[i]; j:=i; end;
const n= 4;
m = 2;
var a: array [1..n, 1..m] of integer;
s: array [1..n] of integer;
i, j, min: integer;
begin
for i:= 1 to n do begin
s[i]:=0;
for j:= 1 to m do
read (a[i,j]);
writeln (''); end;
for i:= 1 to n do
for j:= 1 to m do
s[i]:=s[i]+a[i,j];
j:=1;
min:=s[1];
for i:= 2 to n do
if s[i]<min then begin
min:= s[i];
j:=i; end;
writeln ('');
writeln ('Номер строки с минимальной суммой: ', j);
end.