Ответ:
program z1;
const n=4;
var a : array [1..n,1..n] of integer;
i,j,s1,s2:integer;
begin
for i:=1 to n do
for j:=1 to n do
a[i,j]:=random(90)+10;
write(a[i,j]:4);
if i mod 2 <> 0 then s1:=s1+a[i,j]
else s2:=s2+a[i,j]
end;
writeln
writeln(s1,' ',s2);
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Ответ:
program z1;
const n=4;
var a : array [1..n,1..n] of integer;
i,j,s1,s2:integer;
begin
for i:=1 to n do
begin
for j:=1 to n do
begin
a[i,j]:=random(90)+10;
write(a[i,j]:4);
if i mod 2 <> 0 then s1:=s1+a[i,j]
else s2:=s2+a[i,j]
end;
writeln
end;
writeln(s1,' ',s2);
end.