Question: C++ Code Exercise B: Write a program that reads a string from the user containing a date in the format mm/dd/yyyy . It should print

C++ Code

Exercise B:

Write a program that reads a string from the user containing a date in the format mm/dd/yyyy.

It should print the date in the form March 12, 2014.

Example 1:

Please enter a date in the format mm/dd/yyyy: 03/12/2014

The date you entered is: March 12, 2014

Example 2:

Please enter a date in the format mm/dd/yyyy: 03/12/14

Please enter the date in mm/dd/yyyy format.

Example 3:

Please enter a date in the format mm/dd/yyyy: 15/12/2014

Month should not be more than 12.

Note:

DON'T use else/else if statements, use a string array when displaying the name of months.

Validate user input.

You don't need to loop. Run your code that many times to match the output examples.

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!