int main() {
int choice;
printf("\n----------Welcome to Coffee Shop----------");
printf("\n\n\t1. Login ");
printf("\n\t2. Sign Up ");
printf("\n\nPlease enter 1 or 2: ");
scanf(" %d", &choice);
system("cls||clear");
//put while loop to check
switch (choice) {
case 1:
system("cls||clear");
login();
break;
case 2:
system("cls||clear");
user_signup();
break;
default:
printf("\nInvalid Number\n");
main();
break;
}
return 0;
}
How do i make user retype their input if the input is not int? I tried to use isdigit() but it wont work, May i know what are the solutions?