1 2 3 4 5 6 -Х
2 1 4 3 6 5 -У
INPUT n
DIM a(n)
FOR i = 1 TO n
' INPUT a(i)
a(i) = i
NEXT
FOR i = 1 TO n
PRINT a(i);
NEXT
FOR i = 2 TO n STEP 2
SWAP a(i - 1), a(i)
NEXT
PRINT
FOR i = 1 TO n
PRINT a(i);
NEXT
1 2 3 4 5 6 -Х
2 1 4 3 6 5 -У
INPUT n
DIM a(n)
FOR i = 1 TO n
' INPUT a(i)
a(i) = i
NEXT
FOR i = 1 TO n
PRINT a(i);
NEXT
FOR i = 2 TO n STEP 2
SWAP a(i - 1), a(i)
NEXT
PRINT
FOR i = 1 TO n
PRINT a(i);
NEXT