INPUT "vvedite razmer masiva ", n
DIM a(n)
RANDOMIZE TIMER
PRINT "ishodnyj massiv"
FOR i = 1 TO n
a(i) = INT(100 * RND)
PRINT a(i);
NEXT i
PRINT
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
PRINT "novyj massiv"
FOR i = 1 TO n
PRINT a(i);
NEXT i
Тестирование выполнено в программе QB64 ( Скачать )