const n=5;
var a:array [1..n,1..n] of integer;
i,j,s:integer;
begin
writeln ('Массив: ');
for i:= 1 to n do
for j:=1 to n do
a[i,j]:=Random(100);
write(a[i,j]:3)
end;
writeln;
if i mod 2 = 0 then for j:=1 to n do s:=s+a[i,j];
writeln ('Сумма чётных строк равна: ',s)
end.
const n=5;
var a:array [1..n,1..n] of integer;
i,j,s:integer;
begin
writeln ('Массив: ');
for i:= 1 to n do
begin
for j:=1 to n do
begin
a[i,j]:=Random(100);
write(a[i,j]:3)
end;
writeln;
end;
for i:= 1 to n do
if i mod 2 = 0 then for j:=1 to n do s:=s+a[i,j];
writeln ('Сумма чётных строк равна: ',s)
end.