Home of real teaching & learning
  • Full support for teachers
  • Focus on critical thinking
  • Engaging classroom activities
  • Integrated student eBook
  • Assessed tasks / qBank
  • Practice exam questions

The InThinking Guarantee: Our sites are written by expert practitioners and not by AI

See our AI policy

Disclaimer: InThinking subject sites are neither endorsed by nor connected with the International Baccalaureate Organisation.

Don't miss out, find out!

D.3 Program development repetition statements - While Loops - Exercises

1. In each loop state what is printed. a) b) c) d) e) f) 2. What is the difference between "while-do" and "do-while" loops? 3. Consider the following snippet of code: a) Modify the code to use a while loop b) Modify the code to use a do..while loop. 4. Solve the following problems using while loops. a) Use a do..while loop to print out a line of the characters related to the ASCII codes from 32 to 122. The output...

Help