Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

6 . 1 5 LAB: Parsing dates Complete main ( ) to read dates from input, one date per line. Each date's format must be

6.15 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 substring() method 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:
3/1/1990
12/13/2003
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

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

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

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

Get Started

Students also viewed these Databases questions

Question

00 oo od o; d od 7-9 8

Answered: 1 week ago