Question: Regarding decisions about which type of loop to useif you know your loop will always be executed at least once, then do. . .while is

Regarding decisions about which type of loop to use—if you know your loop will always be executed at least once, then do. . .while is a good option.

When a numeric variable is being changed by a consistent amount with each iteration through the loop, the for statement might be the best option. The while statement can be used to write any type of loop.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Systems Analysis Design Questions!