Computers and Technology

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

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 03:50, TheViperMlg23676
You are working as a security analyst in a company xyz that owns the whole subnet range of 23.0.0.0/8 and 192.168.0.0/8. while monitoring the data, you find a high number of outbound connections. you see that ip's owned by xyz (internal) and private ip's are communicating to a single public ip. therefore, the internal ip's are sending data to the public ip. after further analysis, you find out that this public ip is a blacklisted ip, and the internal communicating devices are compromised. what kind of attack does the above scenario depict?
Answers: 3
image
Computers and Technology, 23.06.2019 02:30, jaueuxsn
Which component acts as a platform on which application software runs
Answers: 2
image
Computers and Technology, 23.06.2019 19:30, bbgirl8638
Of the following pieces of information in a document, for which would you most likely insert a mail merge field?
Answers: 3
image
Computers and Technology, 24.06.2019 00:00, BluedragonKBT44
The gene form of a trait is called a(n) 
Answers: 2
Do you know the correct answer?
Write a basic program that performs simple file and mathematical operations. a. Write a program tha...

Questions in other subjects:

Konu
Mathematics, 18.09.2019 17:00