Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please Solve in C language Input March 1, 1990 April 2 1995 7/15/20 December 13, 2003 -1 Expected output 3-1-1990 12-13-2003 Input April 3, 2014
Please Solve in C language
Input March 1, 1990 April 2 1995 7/15/20 December 13, 2003 -1
Expected output 3-1-1990 12-13-2003
Input April 3, 2014 June 10, 2013 May 5 2010 December 10, 2010 -1
Expected output 4-3-2014 6-10-2013 12-10-2010
Input July 4, 2002 December 25 2003 September 2 2010 3/3/2001 -1
Expected output 7-4-2002
Complete main() to read dates from input, one date per line. Each date's format must be as follows: March 1, 1990. Any date not following that format is incorrect and should be ignored. Use the substring 0 function to parse the string and extract the date. The input ends with -1 on a line alone. Output each correct date as: 3-1-1990. Ex: If the input is: March 1, 1990 April 2 1995 7/15/20 December 13, 2003 -1 then the output is: 31199012132003 Use the provided GetMonthAsInt 0 function to convert a month string to an integer. If the month string is valid, an integer in the range 1 to 12 inclusive is returned, otherwise 0 is returned. Ex: GetMonthAs Int ("February") returns 2 and GetMonthAs Int ("7/15/20" ) returns 0. 453236.3144438.q3zqy7Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started