INPUT n
DIM x(n)
RANDOMIZE TIMER
FOR i = 1 TO n
x(i) = INT(RND * 89) + 10
PRINT x(i);
IF i MOD 2 = 0 THEN s = s + x(i)
NEXT i: PRINT
PRINT s
FOR q = 1 TO n
FOR i = 1 TO n - 1
IF x(i) > x(i + 1) THEN SWAP x(i), x(i + 1)
NEXT i
NEXT q
FOR i = 1 TO n
PRINT x(i);
NEXT i