REM to get 5 names and print them in descending order based on their length CLS DIM n$(5) FOR i = 1 TO 5 INPUT n$(i) NEXT i FOR i = 1 TO 5 FOR j = 1 TO 5 - i IF LEN(n$(j)) < LEN(n$(j + 1)) THEN SWAP n$(j), n$(j + 1) NEXT j NEXT i PRINT "names in descending order based on length" FOR j = 1 TO 5 PRINT n$(j) NEXT j END