Discuss how a loop condition could be constructed to repeat the loop indefinitely and the loop would still terminate.© BrainMass Inc. brainmass.com October 9, 2019, 5:16 pm ad1c9bdddf
This is an interesting question. The paradox is: if a loop by definition repeats indefinitely, why should it terminate?
Trivially it might appear impossible, however, there could be at least two possible ways to make this happen.
a) break statement:
Use of a conditional or unconditional break statement will force any loop to ...
A thorough treatment on how to terminate loops