например:
X:1 2 3 4 5 6
Y:6 5 4 3 2 1
INPUT "vvedite kol-vo elementov ", n
DIM x(n), y(n)
RANDOMIZE TIMER
PRINT "massiv x"
FOR i = 1 TO n
x(i) = INT(RND * 20)
PRINT x(i); " ";
NEXT
PRINT
FOR i = n TO 1 STEP -1
k = k + 1: y(k) = x(i)
NEXT
PRINT "massiv y"
FOR i = 1 TO k
PRINT y(i); " ";
NEXT
Тестирование выполнено в программе QB64 ( Скачать )