X609: Magic Date

A magic date is one when written in the following format, the month times the date equals the year e.g. 6/10/60. Write code that figures out if a user entered date is a magic date. The dates must be between 1 - 31, inclusive and the months between 1 - 12, inclusive. Let the user know whether they entered a magic date. If the input parameters are not valid, return false.

Examples:

magicDate(6, 10, 60) -> true
magicDate(50, 12, 600) -> false

Your Answer:

Reset

Feedback

Your feedback will appear here when you check your answer.