var a:array[1..2,1..7] of integer;
b:array[1..7] of integer;
i,j,s:integer;
begin
for i:=1 to 2 do
for j:=1 to 7 do
a[i,j]:=random(10);
write (a[i,j]:2,' ')
end;
writeln
writeln;
s:=0;
for i:=1 to 2 do s:=s+a[i,j];
b[j]:=s;
for i:=1 to 7 do write (b[i]:2,' ')
end.
var a:array[1..2,1..7] of integer;
b:array[1..7] of integer;
i,j,s:integer;
begin
for i:=1 to 2 do
begin
for j:=1 to 7 do
begin
a[i,j]:=random(10);
write (a[i,j]:2,' ')
end;
writeln
end;
writeln;
for j:=1 to 7 do
begin
s:=0;
for i:=1 to 2 do s:=s+a[i,j];
b[j]:=s;
end;
for i:=1 to 7 do write (b[i]:2,' ')
end.