5. The value of STEP should never be made negative to avoid infinite loops.
Answers
Answered by
2
Answer:
To avoid ending up in an infinite loop while using a for statement, ensure that the statements in the for() block never change the value of the loop counter variable. If they do, then your loop may either terminate prematurely or it may end up in an infinite loop.
Similar questions