Computer Science, asked by rkpanda153, 1 month ago

5. The value of STEP should never be made negative to avoid infinite loops.​

Answers

Answered by MichhDramebaz
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