//Amari Mosley CSC5 Chapter 4, P.220 #3
//
/**************************************************************
*
* Determine Magic Dates
* ____________________________________________________________
* This program will determine whether a date is "magic".
*
*
* Computation is based on the relational operator:
* (month * day == year)
* ____________________________________________________________
* INPUT
* month : Numeric month entered by user
* day : Day entered by user
* year : Two-digit year entered by user
*
* OUTPUT
* Displays whether or not the date is magic
*
**************************************************************/
#include <iostream>
#include <iomanip>
using namespace std;
// Defining Main Function
int main()
{
// Defining int Variables
int month; // Numeric month entered by user
int day; // Day entered by user
int year; // Two-digit year entered by user
// Prompting user to enter month, day, and two-digit year
cout << "Enter a month (in numeric form): ";
cin >> month;
cout << "Enter a day: ";
cin >> day;
cout << "Enter a two-digit year: ";
cin >> year;
// Determining if the date is magic and displaying the result
if (month * day == year)
{
cout << "The date is magic." << endl;
}
else
{
cout << "The date is not magic." << endl;
}
return 0;
}