Monday, October 11, 2021

WAP to print 0.1, 0.11, 0.111 .... up to 7th term.

Using FOR...NEXT

CLS
a = 0.1
FOR i = 1 TO 7
     PRINT a;
     a = a / 10 + 0.1
NEXT i
END


Using WHILE...WEND

CLS
a = 0.1
i = 1
WHILE i <= 7
     PRINT a;
     a = a / 10 + 0.1
     i = i + 1
WEND
END


Using DO...LOOP

CLS
a = 0.1
i = 1
DO
     PRINT a;
     a = a / 10 + 0.1
     i = i + 1
LOOP WHILE i <= 7
END

No comments:

Post a Comment

If you have any doubts, Please let me know.

[Download PDF] Computer Science Book Gread-10 in Nepali Language

 If you are searching for class 10 Computer Science in Nepali pdf for free download then you are at the right page. This book is soley publi...