//Cecilia Rangel CSC5 Chapter 4, P. 225, #23
//
/**************************************************************
 *
 * Computing magic date
 * ____________________________________________________________
 * This program computes whether or not imputed numbers would 
 * would be a magic date
 *
 *This program will utilize the following  relational  operators:
 * >(greater than), <(less than), and ==(equal to)
 *___________________________________________________________
 * INPUT
 * 		month           : Month of date, in numerical form (1-12)
 * 		day             : Day of date
 * 		year            : Year of date
 *	
 * OUTPUT
 *		Display 		: whether or not inputted data is a magic
 *						 date  
 *
 **************************************************************/
#include <iostream>
#include <iomanip>
using namespace std;

int main() {
	int month;     
	int day;       
	int year;      
 
	cout << "Sometimes, a magical date occurs in which the month ";
	cout << "multiplied by the day equals the last two" << endl;
	cout << "digits of the year! Enter a date to see if it's a ";
	cout << "magical date." << endl;
	cout << "Month (1-12): "; 
	cin >> month;
	cout << endl << "Day (1-31)  : ";
	cin >> day;
	cout << endl << "Year (00-99): ";
	cin >> year;
	cout << endl;
	if (month < 1 || month > 12)
		cout << "Month must be entered as a number 1-12!";
	else if (day < 1 || day > 31)
		cout << "Day must be entered as a number 1-31!";
	else if (year < 0 || year > 99)
		cout << "Year must be entered as two digits!";
	else
		if (month * day == year)
			cout << "This date is brimming with magic! Buy lotto.";
		else
			cout << "There is nothing magical about this date. Get back to work.";

	return 0;
}