2. How are looping statements different from selection statements?© BrainMass Inc. brainmass.com October 9, 2019, 10:24 pm ad1c9bdddf
A while loop is intended to run until a particular condition occurs. It is usually not known how many iterations it will take for that condition to be met. A for loop, on the other hand, is usually set to run a known number of times. These are just general rules of thumb that lead to cleaner and ...
This solution explains when it is best to use a while loop versus a for loop. It also explains the difference between a loop and a selection statement.