WHILE LOOP
CLASS 9 & 10 · COMPUTER SCIENCE
prostudypk.com · free MCQ tests
REMEMBERwhile condition:
- Check → run → update → check again
- No update = infinite loop!
- Use for when you know the number of steps
Free test → prostudypk.com
CLASS 9 & 10 · COMPUTER SCIENCEHow do you print 1 to 5 without writing it 5 times?
The while loop in 25 seconds
Watch ↓