//Saliha Babar CS1A Chapter 4, Page 220, #3
//
/************************************************************************
*
* DETERMINATION OF MAGIC DATE
* ______________________________________________________________________
* This program determine if the date is magic based on day, month
* and year entered.
*
* Determination of magic date:
* year == days * months
*________________________________________________________________________
* INPUT
*
* month : numerical month entered by user
* day : numerical day entered by user
* year : numerical year entered by user
*
* OUTPUT
* validation of magic date
* *********************************************************************/
#include <iostream>
using namespace std;
int main() {
int year; // INPUT - numerical year entered by user
int month; // INPUT - numerical month entered by user
int day; // INPUT - numerical day entered by user
// Get user input
cout << "Enter a year, in two digits\n";
cin >> year;
cout << "Enter any month in numerical form\n";
cin >> month;
cout << "Enter any day of that month in numerical form\n";
cin >> day;
// Determination of magic date
if (year == month * day )
{
cout << "Wow! That is a magic date.\n";
}
else
{
cout << "Sorry, that is not a magic date :(\n";
}
return 0;
}