How would I get this program to execute the else statement. I tried typing in letters, and it just acted as if I entered a number less than or equal to 0 and said "Illegal Number" instead of "Illegal Operations, quitting program". And also, is there any way I can have it continue to run the program, until the use wants to quit?
CODE
#include <iostream>
using namespace std;
int main()
{
int score;
printf("Enter the player's game score here: \n");
scanf_s("%d", &score);
if (score < 0) {
printf("Illegal Number\n");
}
else if (score > 0 && score < 100)
{
printf("Player Level: \n");
printf("Beginner\n");
}
else if (score >= 100 && score <500) {
printf("Player Level: \n");
printf("Intermediate\n");
}
else if (score >= 500) {
printf("Player Level: \n");
printf("Expert\n");
}
else {
printf("Illegal operation, quitting program\n");
}
}