t=0 FOR i = 0 TO 8 IF Dat(i) > Dat[i+1] THEN m = Dat(i) Dat(i) = Dat(i+1) Dat(i+1) = m t=t+1 END IF NEXT i PRINT t