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