subject

Write a basic program that performs simple file and mathematical operations. a. Write a program that reads 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 find() 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.
b. After the program is working as above, modify the program so that it reads all dates from an input file "inputDates. txt" (an Example file is attached).
c. Modify your program further so that after parsing all dates from the input file "inputDates. txt", it writes out the correct ones into an output file called: "parsedDates. txt".
Ex: If the input is:
March 1, 1990
April 2 1995
7/15/20
December 13, 2003
-1
then the output is:
3/1/1990
12/13/2003

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 12:10
2. fabulously fit offers memberships for$35 per month plus a $50 enrollmentfee. the fitness studio offersmemberships for $40 per month plus a$35 enrollment fee. in how many monthswill the fitness clubs cost the same? what will the cost be?
Answers: 1
question
Computers and Technology, 23.06.2019 13:30
Select the correct answer from each drop-down menu. which types of computer networks are bigger as well as smaller than a man? a man is a network of computers that covers an area bigger than a , but smaller than a .
Answers: 1
question
Computers and Technology, 23.06.2019 15:10
What role did women fill during world war ii?
Answers: 1
question
Computers and Technology, 23.06.2019 19:30
Of the following pieces of information in a document, for which would you most likely insert a mail merge field?
Answers: 3
You know the right answer?
Write a basic program that performs simple file and mathematical operations. a. Write a program tha...
Questions
question
Mathematics, 10.02.2021 02:40
question
Mathematics, 10.02.2021 02:40
question
Mathematics, 10.02.2021 02:40
question
Business, 10.02.2021 02:40
question
Mathematics, 10.02.2021 02:40
Questions on the website: 13722359