Saturday, October 2, 2021

QBASIC Program to print the series 5, 25, 125, 625, 3125 …. up to 7th terms.

Using FOR...NEXT

CLS
a = 5
FOR i = 1 TO 7
      PRINT a;
      a = a * 5
NEXT i
END


Using WHILE...WEND

CLS
a = 5
i = 1
WHILE i <= 7
      PRINT a;
      a = a * 5
      i = i + 1
WEND
END


Using DO ... LOOP

CLS
a = 5
i = 1
DO WHILE i <= 7
      PRINT a;
      a = a * 5
      i = i + 1
LOOP
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...