CLS
DATA 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
DIM A(15), B(15)
' Zapolnim massiv
FOR i = 1 TO 15
READ B(i)
PRINT B(i);
NEXT: PRINT
' Iz massiva B v A s tsikl. sdvigom
FOR i = 1 TO 15
NewX = (i + 3) MOD 15 + 1 'Otkuda brat el-t
A(i) = B(NewX)
NEXT
' Rezultat
FOR i = 1 TO 15
PRINT A(i);
NEXT
Тестирование выполнено в программе QB64 ( Скачать )