const n=5;
var a: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
a[i,j]:=random(9)+1;
write (a[i,j]:3)
end;
writeln;
end;
writeln;
for i:=1 to n do
begin
s:=0;
for j:=1 to n do s:=s+a[i,j];
writeln ('Сумма элементов ',i,' строки равна ',s);
end
end.