Exit program by user input

Hi Guys,

I'm half way through writing a program that requites the user to terminate at any point if they enter "999"

I know its fairly straight forward but I cant seem to find a simple answer anywhere, like is there just a line or two of code I can add to achieve this?

Depends on what your code looks like. It's usually something like a *break* if it's to terminate a loop, or a *return* if it's to end a function.
Before advising you, I'd like to know how you are getting the user's input.
Topic archived. No new replies allowed.