There are 3 ways you check the exit condition of a loop.

  1. Top testing. When the condition is checked before any actions are ran.
    1. C While Loops
    2. For Loops
  2. Middle testing. when exit can be done at the middle of the loop
    1. Break
    2. Continue
  3. Bottom testing. When exit condition checked after all actions ran.
    1. Do While Loops