Computers and Technology, 23.06.2020 18:01 keigleyhannah30
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
Answers: 2
Computers and Technology, 21.06.2019 22:00
Which is produced by the endocrine system to control how cells and organs function
Answers: 2
Computers and Technology, 23.06.2019 17:10
Ac++an of of pi. in , pi is by : pi = 4 – 4/3 + 4/5 – 4/7 + 4/9 - 4/11 + 4/13 - 4/15 + 4/17 . ., to pi (9 ). , if 5 to pi,be as : pi = 4 - 4/3 + 4/5 - 4/7 + 4/9 = 4 – 1. + 0.8 - 0. + 0. = 3.. atoofbe to pi?
Answers: 2
Computers and Technology, 23.06.2019 18:30
Write a program that prints the day number of the year, given the date in the form month-day-year. for example, if the input is 1-1-2006, the day number is 1; if the input is 12-25-2006, the day number is 359. the program should check for a leap year. a year is a leap year if it is divisible by 4, but not divisible by 100. for example, 1992 and 2008 are divisible by 4, but not by 100. a year that is divisible by 100 is a leap year if it is also divisible by 400. for example, 1600 and 2000 are divisible by 400. however, 1800 is not a leap year because 1800 is not divisible by 400.
Answers: 3
Write a basic program that performs simple file and mathematical operations.
a. Write a program tha...
Health, 29.08.2019 03:30
Social Studies, 29.08.2019 03:30
History, 29.08.2019 03:30
Computers and Technology, 29.08.2019 03:30
Chemistry, 29.08.2019 03:30
Physics, 29.08.2019 03:30
Computers and Technology, 29.08.2019 03:30
Mathematics, 29.08.2019 03:30