Using FOR...NEXT
Using WHILE...WEND
CLS
n = 1
i = 1
WHILE i <= 5
PRINT n ^ 3;
n = n + 2
i = i + 1
WEND
END
n = 1
i = 1
WHILE i <= 5
PRINT n ^ 3;
n = n + 2
i = i + 1
WEND
END
Using DO ... LOOP
CLS
n = 1
i = 1
DO
PRINT n ^ 3;
n = n + 2
i = i + 1
LOOP WHILE i <= 5
END
n = 1
i = 1
DO
PRINT n ^ 3;
n = n + 2
i = i + 1
LOOP WHILE i <= 5
END
No comments:
Post a Comment
If you have any doubts, Please let me know.