1.
uses crt;
const n=5;
var i,j,ans:integer;
a:array[1..n,1..n] of integer;
begin
randomize;
for i:=1 to n do
begin
for j:=1 to n do
begin
a[i,j]:=random(5,10);
write(a[i,j],' ');
end;
writeln();
end;
for i:=1 to n do
begin
ans:=0;
for j:=1 to n do
begin
if a[i,j]>7 then
ans:=ans+1;
end;
writeln('In ',i,': ',ans);
end;
end.
2.
uses crt;
const n=3;
var i,j,t:integer;
a:array[1..n,1..n] of integer;
begin
writeln('Input array:');
for i:=1 to n do
for j:=1 to n do
read(a[i,j]);
for j:=1 to n do
begin
t:=a[1,j];
a[1,j]:=a[3,j];
a[3,j]:=t;
end;
for i:=1 to n do
begin
for j:=1 to n do
write(a[i,j],' ');
writeln();
end;
end.