What loop should I use to make user input value again if statement is false? I mean there are max 31 days in a month so if user inputs 32, program will ask to type again, and if statement is true then loop exits.
int main()
{
int day;
cout<<"Enter a day"<<endl;
cin>>day;
if(day<32){
// class Input
Input inObject(day);
// printInput(){cout<<"Today is the "<<input<<endl;}
inObject.printInput();
}else{
cout<<"Incorrect day! Enter again."<<endl;
}
return 0;
}