How to teach which loop should be used
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.