easy if statement
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.
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;
cout << "You are correct sir!\n" << endl;
if( dayNum<1 || dayNum>31 )
cout << "Error Tastic!"
thanks, its almost 3 AM here, my brain is a little fried