s = 0 n = 0 FOR i = 0 TO 11 IF A(i) <= A(n) THEN s = s+ i t = A(i) A(i) = A(n) A(n) = t END IF NEXT i