Var
a: array[0..10] of integer;
i, n, k: integer;
// b: array[1..4, 1..4] of integer;
begin
Println();
Println(1);
for i := 0 to 10 do
A[i] := i + 1;
PrintLn(a);
Println();
for i := 1 to 10 do
begin
A[i] := A[i - 1];
PrintLn(a);
end;
Println();
Println(2);
for i := 0 to 10 do
A[i] := i + 1;
PrintLn(a);
Println();
for i := 10 downto 0 do
begin
A[i] := A[10 - i];
PrintLn(a);
end;
end.
Тут вывод трасировок последних циклов
1
[1,2,3,4,5,6,7,8,9,10,11]
[1,1,3,4,5,6,7,8,9,10,11]
[1,1,1,4,5,6,7,8,9,10,11]
[1,1,1,1,5,6,7,8,9,10,11]
[1,1,1,1,1,6,7,8,9,10,11]
[1,1,1,1,1,1,7,8,9,10,11]
[1,1,1,1,1,1,1,8,9,10,11]
[1,1,1,1,1,1,1,1,9,10,11]
[1,1,1,1,1,1,1,1,1,10,11]
[1,1,1,1,1,1,1,1,1,1,11]
[1,1,1,1,1,1,1,1,1,1,1]
2
[1,2,3,4,5,6,7,8,9,10,11]
[1,2,3,4,5,6,7,8,9,10,1]
[1,2,3,4,5,6,7,8,9,2,1]
[1,2,3,4,5,6,7,8,3,2,1]
[1,2,3,4,5,6,7,4,3,2,1]
[1,2,3,4,5,6,5,4,3,2,1]
[1,2,3,4,5,6,5,4,3,2,1]
[1,2,3,4,5,6,5,4,3,2,1]
[1,2,3,4,5,6,5,4,3,2,1]
[1,2,3,4,5,6,5,4,3,2,1]
[1,2,3,4,5,6,5,4,3,2,1]
[1,2,3,4,5,6,5,4,3,2,1]