#include<iostream>
usingnamespace std;
int main()
{
int month, day, year;
cout<<"Please enter a month";
cin>>month;
if(month>0 && month<=12)
{
cout<<"Please enter a day";
cin>>day;
if(day>0 && day<=31)
{
cout<<"Please enter a year";
cin>>year;
if(year>0 && year<=99)
{
cout<<"Thank you for valid input";
if(day*month==year)
cout<<"This date is Magic!";
else
} cout<<"This date is not magic";
else
} cout<<"Please enter a valid year";
else
cout<<"Please enter a valid day";
}
else
cout<<"Please enter a valid month";
return 0;
}
#include<iostream>
usingnamespace std;
int main()
{
int month, day, year;
cout<<"Please enter a month";
cin>>month;
if(month>0 && month<=12)
{
cout<<"Please enter a day";
cin>>day;
if(day>0 && day<=31)
{
cout<<"Please enter a year";
cin>>year;
if(year>0 && year<=99)
{
cout<<"Thank you for valid input";
if(day*month==year)
cout<<"This date is Magic!";
else
}
cout<<"This date is not magic";
else
}
cout<<"Please enter a valid year";
else
cout<<"Please enter a valid day";
}
else
cout<<"Please enter a valid month";
return 0;
}