Var
m : array[1..10] of Integer;
i,t : Integer;
Begin
For i:=1 to 10 do
Begin
m[i]:=i;
Write(m[i]:3);
end;
Writeln;
For i:=1 to 3 do
Begin
t:=m[i];
m[i]:=m[10-3+i];
m[10-3+i]:=t;
end;
For i:=1 to 10 do Write(m[i]:3);
Writeln;
end.
Результат:
1 2 3 4 5 6 7 8 9 10
8 9 10 4 5 6 7 1 2 3