// Chapter 4 - Programming Challenge #3
// Magic Dates
// This program asks the user to enter a month, day,
// and two-digit year. It determines whether the date
// is a "magic date" by checking if the month times
// the day is equal to the year.

#include <iostream>
using namespace std;

int main()
{
    // Variables to store the month, day, and two-digit year
    int month, day, year;

    // Get the month from the user
    cout << "Enter a month: ";
    cin >> month;

    // Get the day from the user
    cout << "Enter a day: ";
    cin >> day;

    // Get the two-digit year from the user
    cout << "Enter a two-digit year: ";
    cin >> year;

    // Check if the month multiplied by the day
    // is equal to the year
    if (month * day == year)
    {
        cout << "The date is magic!" << endl;
    }
    else
    {
        cout << "The date is not magic." << endl;
    }

    return 0;
}