Var a:array [1..5,1..3] of integer; b:array[1..5] of integer; x,y,imax:integer; Begini:=1; randomize; for x:=1 to 5 do for y:=1 to 3 do a[x,y]:=random(10); for x:=1 to 5 do Begin for y:=1 to 3 do write(a[x,y],' '); writeln; End; for y:=1 to 3 do Begin for x:=1 to 5 do b[i]:=b[i]+a[x,y]; i:=i+1; End; for i:=1 to 3 do if b[i]>max then max:=b[i]; writeln(max); End.
a:array [1..5,1..3] of integer;
b:array[1..5] of integer;
x,y,imax:integer;
Begini:=1;
randomize;
for x:=1 to 5 do
for y:=1 to 3 do
a[x,y]:=random(10);
for x:=1 to 5 do
Begin
for y:=1 to 3 do
write(a[x,y],' ');
writeln;
End;
for y:=1 to 3 do
Begin
for x:=1 to 5 do
b[i]:=b[i]+a[x,y];
i:=i+1;
End;
for i:=1 to 3 do
if b[i]>max then max:=b[i];
writeln(max);
End.