Monday, October 4, 2021

QBASIC Program to print the series 0, 2, 4, 6, 8 ...... up to 100

Using FOR...NEXT

CLS
FOR i = 0 TO 100 STEP 2
      PRINT i;
NEXT i
END

Using WHILE...WEND

CLS
i = 0
WHILE i <= 100
      PRINT i;
      i = i + 2
WEND
END


Using DO ... LOOP

CLS
i = 0
DO WHILE i <= 100
      PRINT i;
      i = i + 2
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...