Terminating a program

So im writing a program for the quadratic formula, and have everything except for something that will terminate the program if a letter is entered into a, b, or c as a value. what is the best way to do so?
The program terminates when you return from the main function.
guess i asked the wrong question, i meant that when the program prompts the user for a integer value and the user types in a letter, i would like it to come up with Improper value input and then terminate the program. currently if you put in a letter it goes crazy and shows some strange output values.
You need input validation (to the rescue!)...
http://www.cplusplus.com/forum/beginner/18258/#msg92955
http://www.cplusplus.com/forum/beginner/13044/#msg62827
(Variations on a theme. The second way is the most robust way.)

Hope this helps.
Topic archived. No new replies allowed.