program raf105;
var
a: array[1..50] of integer;
b: array [1..50,1..50] of integer;
i,j,n,c,o: integer;
begin
write('Введите размер массива: ');
readln(n);
writeln('Вводите числа по очереди');
for i:=1 to n do
readln(a[i]);
c:= n+1;
for i:=1 to n do
begin
writeln;
j:=0;
for o:=c to n do
begin
j:= j+1;
b[i,j]:= a[o];
write(a[o],' ');
end;
for o:=1 to c-1 do
begin
j:= j+1;
b[i,j]:= a[o];
write(a[o],' ');
end;
c:=c-1;
end;
end.
PascalABC 3.4.2