помогите пожалуйста с паскалем
Ответы
1.
program sdvig_ktoi_stroki;
uses crt;
var i,j,n:integer;
a:array[1..100,1..100] of integer;
begin
read(n);
for i:=1 to n do
begin
for j:=1 to n do
begin
a[i,j]:=random(45)+22;
write(a[i,j],' ');
end;
writeln;
end;
for i:=1 to n do
begin
for j:=1 to n do
if(i<j) and(a[i,j]<>a[j,i])then
begin
write('no');
exit;
end;
writeln;
end;
if (i=n)and(j=n) then
write('yes')
end.
2.
program sdvig_ktoi_stroki;
const n=10;
var i,j,k:integer;
a:array[1..n,1..n] of integer;
begin
for i:=1 to n do
begin
for j:=1 to n do
begin
a[i,j]:=random(10);
write(a[i,j],' ');
end;
writeln;
end;
read(k);
for i:=k to n-1 do
for j:=1 to n do
a[i,j]:=a[i+1,j];
for j:=1 to n do
a[n,j]:=0;
for i:=1 to n do
begin
for j:=1 to n do
write(a[i,j],' ');
writeln;
end;
end.