Program n1; const n=7; var a: array[1..n,1..n] of integer; i,j,sum: integer; begin randomize; writeln('исходный массив:'); for i:=1 to n do begin for j:=1 to n do begin a[i,j]:=random(9)+1; write(a[i,j],' '); end; writeln; end; for i:=1 to n do sum:=sum+a[1,i]; write('сумма элементов 1 строки: ',sum); end.
Answers & Comments
Verified answer
Program n1;const n=7;
var a: array[1..n,1..n] of integer;
i,j,sum: integer;
begin
randomize;
writeln('исходный массив:');
for i:=1 to n do
begin
for j:=1 to n do
begin
a[i,j]:=random(9)+1;
write(a[i,j],' ');
end;
writeln;
end;
for i:=1 to n do sum:=sum+a[1,i];
write('сумма элементов 1 строки: ',sum);
end.