Indefinite Iteration
- The
while loop
- Questions to ask:
- Will the loop ever stop?
- Will the loop do the right thing:
- If the condition is false?
- If the condition is true exactly once?
- If the condition is true two or more times?
- If the condition is "almost" false?
- The
break statement
- Some example loops: