answersLogoWhite

0

There are three ways out of a loop.

1. Satisfy the loop ending condition
2. Execute a break statement
3. Terminate the program

Perhaps you are not changing the value of the variable that is used in the loop ending condition. Perhaps you are using a variable, such as an unsigned int, decrementing it, and expecting it to go negative. Suggest you run the program in a debuger and step through the loop.

User Avatar

Wiki User

15y ago

What else can I help you with?