Question: 2. 120 points] Write a program that takes a date in the following format: December 25th, 2018 and extracts the day, month, and year as

 2. 120 points] Write a program that takes a date in

2. 120 points] Write a program that takes a date in the following format: December 25th, 2018 and extracts the day, month, and year as 3 integers. You may want to use the following functions: (a) Write a function get Date that prompts a user to enter a date as a string and retuns (b) Write a function extract that takes as its parameter a date and retuns the day (c) Write a function convertDigits that takes as its parameter a string of digits and (d) Write a function convertMonths that takes as its parameter a month as a string it. month, and year as 3 integers. converts it to an int. and returns a corresponding number from 1 to 12 (1 for January,..., 12 for Decem- ber). (e) Write a program that repeatedly prompts the user to enter the date in the previous format. The program should then output it as in the examples below For example, Enter a date - December 25th, 2018 25/12/2018 Try again (Y/N) Y Enter a date -February 29th, 2018 29/2/2018 Try again (Y/N) -- Y Enter a dateFebruary 2nd, 2018 2/2/2018 . Try again (Y/N) N

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!