How could I design an if statement to where it would return an error message if the user did not enter the values 1-31.
Like so:
PHP Code:
cout << "Please enter the desired day (choose from 1-31) ";
cin >> dayNum;
if(dayNum!=1 && dayNum!=2 &&dayNum !=3 &&...)// need to make this more simple!!!!!
{
cout << "Invalid entry\n" << endl;
menu(proceed);
}
cout << "You are correct sir!\n" << endl;