can someone help me please? Write a program that asks the user to enter a month (in numeric form), a day, and a
two-digit year. The program should then determine whether the month times the day
is equal to the year. If so, it should display a message saying the date is magic. Otherwise
it should display a message saying the date is not magic.
#include <iostream>
usingnamespace std;
int main(int argc, constchar * argv[])
{
int month, day, year;
int magic;
cout << "This program will determine ";
cout << "if a certain date is *magic*.";
cout << " First, pick any date.";
cout << " Now, enter the numerical enterpretation";
cout << " of the month that it's in. " << endl;
cout << "(Ex: February 7th, 2014= 2):" << endl;
cin >> month;
cout << "Now enter the day " << endl;
cout << "(Ex: March 31st, 2000= 31):" << endl;
cin >> day;
cout << "And finally, enter the";
cout << " last two didgits of the year" << endl;
cout << "(Ex: April 4th, 1996= 96):" << endl;
cin >> year;
magic = month * day;
if (magic == year)
{
cout << "Your date is *magic*!\n";
}
else
{
cout << "Sorry, the date you entered is not *magic*.\n";
cout << "Please feel free to try again!\n";
}
return 0;
}