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
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.
Please develop an algorithm and test it with a JavaScript program that responds to the problem description (Magic Dates) . Test it with what ever dates you want but, 4/4/16 or 2/8/16 are 'Magic Dates'. Make sure you test a date that is not magic in order to check the output is correct.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started