INPUT "vvedite ramernost ", n
DIM a(n)
FOR i = 1 TO n
INPUT "Element ", a(i)
NEXT
FOR i = 1 TO n
FOR j = 2 TO n
IF a(j) < a(j - 1) THEN SWAP a(j), a(j - 1)
NEXT
NEXT
FOR i = 1 TO n
PRINT a(i);
NEXT
Тестирование выполнено в программе QB64 ( Скачать )