Program asd; Const n=4; Var C:array[1..n,1..n] of integer; i,j,s:integer; BEGIN For i:=1 to n do begin For j:=1 to n do begin C[i,j]:=1+Random(9); Write(C[i,j],' '); end; Writeln; end; Writeln; For j:=1 to n do begin s:=0; For i:=1 to n do begin S:=S+C[i,j]; end; Writeln('Столбец[',j,'] = ',s); end; END.
Const n=4;
Var C:array[1..n,1..n] of integer;
i,j,s:integer;
BEGIN
For i:=1 to n do
begin
For j:=1 to n do
begin
C[i,j]:=1+Random(9);
Write(C[i,j],' ');
end;
Writeln;
end;
Writeln;
For j:=1 to n do
begin
s:=0;
For i:=1 to n do
begin
S:=S+C[i,j];
end;
Writeln('Столбец[',j,'] = ',s);
end;
END.