How to teach which loop should be used In most languages, there are many different types of loops. The most common ones seem to be for loop, while loops, and do while loops.

What is the best way to illustrate the differences between the loops, not in terms of syntax, but in terms of recommended usage. For example, a while loop with an iterator variables can usually be replaced by a for loop. A while true loop with a break statement at the end could be better expressed as a do while loop. 

How can I get my students to use the correct loops in each situation? How can I show them when a loop can be better expressed in another form?
Use the for when you know how many times to execute it, such as counting, or iterating over an array. Use while or do .. while if you don't. The choice between while and do .. while is if you need to do the loop one time before the test use do ... while otherwise use while.

A full explanation can be found on Stack Overflow in this accepted answer.