Program gt2;
var i,j,s:integer;
a:array[1..4,1..4]of integer;
begin
randomize;
for i:=1 to 4 do
for j:=1 to 4 do
a[i,j]:=random(7)+12;
for i:=1 to 4 do
begin
s:=0;
for j:=1 to 4 do
s:=s+a[j,i];
writeln(s);
end;
end.
program gt3;
var i,j,s:integer;
a:array[1..7,1..7]of integer;
begin
randomize;
for i:=1 to 7 do
for j:=1 to 7 do
a[i,j]:=random(7)+12;
for i:=1 to 7 do
begin
s:=0;
for j:=1 to 7 do
if(a[j,i]<14)then s:=s+1;<br>writeln(s);
end;
end.
program gt4;
var i,j,p:integer;
a:array[1..3,1..3]of integer;
begin
for i:=1 to 3 do
for j:=1 to 3 do
read(a[i,j]);
for i:=1 to 3 do
begin
p:=a[i,1];
a[i,1]:=a[i,2];
a[i,2]:=p;
end;
for i:=1 to 3 do
begin
for j:=1 to 3 do
begin
write(a[i,j],' ');
end;
writeln;
end;
end.