How can you tell whether a loop ended prematurely?
Ans. Generally, loops are dependent on one or more variables. Your program can check those variables outside the loop to ensure that the loop executed properly. For instance, consider the following example:
See more
Download the Study24x7 App, so you can connect and collaborate.