QUESTION IMAGE
Question
when creating a definite loop, you should ensure that within the loops body the loop control variable is
a. reassigned, incremented, or decremented
b. compared with a sentinel value
c. not used as a counter for the loop
d. altered by each statement
In a definite loop, the loop - control variable must change (be reassigned, incremented, or decremented) within the loop body to ensure the loop terminates. Comparing with a sentinel value is for indefinite loops. It is often used as a counter, and it doesn't need to be altered by each statement.
Snap & solve any problem in the app
Get step-by-step solutions on Sovi AI
Photo-based solutions with guided steps
Explore more problems and detailed explanations
a. reassigned, incremented, or decremented