Saved Bookmarks
| 1. |
WAP to display 1st 5 whole numbers using FOR & WHILE Loop. in qbasic |
|
Answer» en problem is solved using - QBASIC.1. Using For Loop:CLSFOR I = 0 TO 4 PRINT I;NEXT IEND2. Using While Loop:CLSI = 0WHILE I < 5 PRINT I; I = I + 1WENDENDWhole number start from 0. First five whole numbers are 0, 1, 2, 3, 4.Iterate loop from X = 0 to 4 -> Display the value of X.See ATTACHMENT for output. |
|