#include <stdio.h>
int main() {
int input;
do {
printf("Welcome to the Arithmetic Quiz Program!\n\n");
printf("Please choose one of the following by entering the correspoding "
"number:\n\n");
printf("1. Give me an addition problem.\n");
printf("2. Give me a subtraction problem.\n");
printf("3. Give me a multiplication problem.\n");
printf("4. Quit.\n\n");
scanf(" %i", &input);
} while (input != 1 && input != 2 && input != 3 && input != 4);
return 0;
}
When I enter something that's not integer (ex: 'a','b',..), it turns out like this: