Using FOR...NEXT
CLS
FOR i = 10 TO 1 STEP -2
PRINT i;
FOR i = 10 TO 1 STEP -2
PRINT i;
Using WHILE...WEND
CLS
i = 10
WHILE i >= 1
PRINT i;
i = i - 2
WEND
END
i = 10
WHILE i >= 1
PRINT i;
i = i - 2
WEND
END
Using DO ... LOOP
CLS
i = 10
DO WHILE i >= 1
PRINT i;
i = i - 2
LOOP
END
i = 10
DO WHILE i >= 1
PRINT i;
i = i - 2
LOOP
END
No comments:
Post a Comment
If you have any doubts, Please let me know.