CLS
INPUT "vvedite razmer massiva"; n
DIM a(n)
FOR i = 1 TO n
PRINT "vvedite element"; i
INPUT a(i)
NEXT
CLS
PRINT "massiv"
FOR i = 1 TO n
PRINT a(i);
NEXT
FOR i = 2 TO n
c = a(i)
j = i - 1
DO WHILE j > 0 AND ABS(a(j)) > ABS(c)
a(j + 1) = a(j)
j = j - 1
LOOP
a(j + 1) = c
NEXT
PRINT
PRINT "new massiv"
FOR i = 1 TO n
PRINT a(i);
NEXT
Тестирование выполнено в программе QB64 ( Скачать )