Additional Control Structures
In this lab, we will review while loops and introduce two new forms of
loop. You will also learn the switch case statement.
Here is a list showing what you need to learn:
- Using
forloops as counting loops - Using
do-whileevent controlled loops when you want to run the loop at least once - Correctly use
caseanddefaultlabels andbreakstatements as part ofswitchstatements.
You have a choice of doing Exercises 1 to 3, or Exercise 4.