Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

in c++ please 11.12 LAB: Parsing dates Complete main() to read dates from input, one date per line. Each date's format must be as follows:

image text in transcribed

in c++ please

11.12 LAB: Parsing dates 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 substr() 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 21995 7/15/20 December 13,2003 1 then the output is: 31199012132003 Use the provided DateParser( 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: DateParser ("February") returns 2 and DateParser("7/15/20") returns 0. 4500422771164+2x+57 \begin{tabular}{|l|l|l|l} LAB \\ ACTIVITY & 11.12.1: LAB: Parsing dates & 0/10 \end{tabular} Run your program as often as you'd like, before submitting for grading. Below, type any needed input values in the first box, then click Run program and observe the program's output in the second box

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Illuminated

Authors: Catherine M Ricardo, Susan D Urban

3rd Edition

1284056945, 9781284056945

Students also viewed these Databases questions