int main ()
{
cout << "This C++ program prints the day number of the year,\n";
cout << "give the date in the form of month, then day,\n";
cout << "then year\n\n";
cout << "Enter date in form: month day year:\n\n";
do{
int month;
int day;
char answer;
int number;
int numb;
cout << "Enter month : ";
cin >> month;
while (!validMonth(number)){
cout << month << " is an invalid month number\n\n\n";
cout << "Try another date Y/N ---> ";
cin >> answer;
}
cout << "Enter day : ";
cin >> day;
while (!validDay(numb)){
cout << day << " is an invalid day number\n\n\n";
cout << "Try another date Y/N ---> ";
cin >> answer;
}
}
while (answer != 'n' && answer !='N')