Const n=10; m=5; var i,j,s:integer; a:array[1..m,1..n]of integer; b:array[1..n]of integer; begin writeln('Массив А:'); for i:=1 to m do begin for j:=1 to n do begin a[i,j]:=random(10); write(a[i,j]:3); end; writeln; end; for j:=1 to n do begin s:=0; for i:=1 to m do s:=s+a[i,j]; b[j]:=s; end; writeln('Массив В:'); for i:=1 to n do write(b[i]:3); end.
n=10;
m=5;
var
i,j,s:integer;
a:array[1..m,1..n]of integer;
b:array[1..n]of integer;
begin
writeln('Массив А:');
for i:=1 to m do
begin
for j:=1 to n do
begin
a[i,j]:=random(10);
write(a[i,j]:3);
end;
writeln;
end;
for j:=1 to n do
begin
s:=0;
for i:=1 to m do s:=s+a[i,j];
b[j]:=s;
end;
writeln('Массив В:');
for i:=1 to n do write(b[i]:3);
end.