How can you prevent endless loop
Anonymous
Ensure you have at least one statement within the loop that changes the value of the comparison variable. (That is, the variable you use in the loop's comparison statement.) ... Never leave the terminating condition to be dependent on the user.
Check out your Company Bowl for anonymous work chats.