INPUT "n="; n
DIM a(n) AS INTEGER
RESTORE
FOR i = 1 TO n
READ a(i)
NEXT i
FOR i = 1 TO n - 1
mi = a(i): u = i
FOR j = i TO n
IF a(j) < mi THEN
mi = a(j): u = j
END IF
NEXT j
r = a(i): a(i) = mi: a(u) = r
NEXT i
FOR i = 1 TO n
PRINT a(i);
NEXT i
END
DATA 12,-3,34,2,76,0,-45,23,12,0,23,6