Lets say we got a program and we want someone to type either 1 or 2 in order to do something. If they type 1) any other integer or if 2) they do not type anything (and just press enter), how can i make the program not crash? I mean e.g. if they type 4 then the program to show again the phrase 'please type either 1 or 2'; and to repeat again and again the prompt until the user types 1 or 2. thank you
