C++ Programming Challenge 4-3: Magic Dates (C++ Ternary Operator, C++ If statements)

Share it with your friends Like

Thanks! Share it with your friends!

Close

Starting Out With C++ From Control Structures Through Objects
Using C++ if statements and C++ Ternary Operator to determine the correct output.

The date june 10, 1960 is special because when we write it in the following format,
the month times the day equal the year.
6/10/60 6×10=60
Write a program that asks the user to enter a month (in numeric form), a day, and a
two-digit ywar. The program should then determine whether a month times the day is
equal the to 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.

DOWNLOAD SOURCE FILES: yt-4-3-MagicDates

Comments

Write a comment

*