REM loops.bas REM looping CLS PRINT "25131 Example program for loops" PRINT "Very simple loops to print colours from 1 to 15" PRINT PRINT "First loop - WHILE" x = 1 DO WHILE x < 16 COLOR x PRINT "This is colour number: "; x x = x + 1 LOOP SLEEP PRINT PRINT "Second loop - DO UNTIL" x = 1 DO COLOR x PRINT "This is colour number: "; x x = x + 1 LOOP UNTIL x > 15 SLEEP PRINT PRINT "Third loop - FOR .. NEXT" FOR x = 1 TO 15 COLOR x PRINT "This is colour number: "; x NEXT x PRINT 'End program" END