Ask Question

The date June 10, 1960, is special because when it is written in the following format, the month times the day equals the year: 6/10/60 Design 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 equals 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.

+5
Answers (1)
  1. 19 December, 08:46
    0
    Let's do it in Python, we can start by prompting user for the inputs

    month = int (input ("Enter a month (in numeric) : "))

    day = int (input ("Enter a day (in numeric) : "))

    year = int (input ("Enter a 2-digit year: "))

    # now check if the month times day equals the year:

    if month * day = = year:

    print ("The date is magic")

    else:

    print ("The date is not magic")
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “The date June 10, 1960, is special because when it is written in the following format, the month times the day equals the year: 6/10/60 ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers