The FOR ... Next is a most popular and mostly used looping statement which is used to execute the set of statements repeatedly for a given number of times.
FOR = TO STEP n [statements] NEXT
WAP to print the natural numbers from 1 to 10.
CLS FOR x = 1 TO 10 PRINT x; NEXT x END
WAP to print even numbers from 1 to 20
CLS FOR i = 2 TO 20 STEP 2 PRINT i; NEXT i END
WAP to print the numbers from 20 to 1 in descending order.
CLS FOR a = 20 TO 1 STEP -1 PRINT a; NEXT a END
WAP to print your name 10 times
CLS FOR i = 1 TO 10 PRINT "Your Name" NEXT i END
WAP to print the multiplication table of given number.
CLS INPUT "Enter a number "; n FOR c = 1 TO 10 PRINT n; "x"; c; "="; n * c NEXT c END