CLS
RANDOMIZE TIMER
INPUT "vvedite n"; n
DIM a(n)
FOR i = 1 TO n
a(i) = FIX(RND * 90 + 10)
NEXT
FOR i = 1 TO n
PRINT a(i);
NEXT
min = a(1)
FOR i = 1 TO n
IF a(i) < min THEN min = a(i): k = i
NEXT
SWAP a(n), a(k)
PRINT
FOR i = 1 TO n
PRINT a(i);
NEXT
Тестирование выполнено в программе QB64 ( Скачать )