Question: Write a C + + program that reads in three integer values that represent a month, date, and four - digit year. Your program should

Write a C++ program that reads in three integer values that represent a month, date, and four-digit year. Your program should print the date in one of following formats depending on the user's input.
If the user enters 1, then print the month as a word ("January"), the date as an integer (11), and the year (1999).
If the user enters 2, then print the month as a three-letter abbreviation ( "Jan. "), date as an integer (11), and the year (1999).
If the user enters 3, then print month as an integer (01), the date as an integer (11), and the year (1999).
Here is a sample run (user's input shown in bold):
Please enter a date (three integers: month, day, year): 1211999
How would you like to print your date?
Month date, full year. (January 11,1999): Enter 1.
Abbreviated month date, full year (Jan.1,1999): Enter 2.
Month/date/year (12/1/1999): Enter 3.
1
If the user enters 1, then the output would be
December 1,1999.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!