I have made a program that offers the user several options from which to choose from. Each one has an integer assigned (e.g. 1,2,3...) and the user enters the number of the option he has selected. I use the scanf function to get the user's choice and the switch statement to branch through the program. Still if I am careless enough to enter a letter instead of a number the program will crash. How can I prevent that?