subject

Write a program that creates the following three files:. dataplus. txt. dataminus. txt. zeros. txtThe program should read each line of the data. txt file and perform the following:. If the line contains a positive number, that number should be written to the dataplus. txt file.. If the line contains a negative number, that number should be written to the dataminus. txt file.. If the line contains the value 0, do not write the value to a file. Instead, keep a count of the number of times 0 is read from the data. txt file. After all the lines have been read from the data. txt file, the program should write the count of zeros to the zeros. txt file.

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 11:30, mmimay3501
What do character formats do for your document's message? a. set the tone b. provide organization c. provide clarity d. set how texts align with documents
Answers: 2
image
Computers and Technology, 22.06.2019 17:40, pnhandley01
Consider the simple 3-station assembly line illustrated below, where the 2 machines at station 1 are parallel, i. e., the product only needs to go through one of the 2 machines before proceeding to station 2.what is the throughput time of this process?
Answers: 2
image
Computers and Technology, 23.06.2019 00:30, hannahrasco4051
Pl i need the answer now ! which one of the following is considered a peripheral? a software b mouse c usb connector d motherboard
Answers: 1
image
Computers and Technology, 23.06.2019 02:50, bfell92
There’s only one game mode that stars with the letter ‘e’ in cs: go. which of the options below is it?
Answers: 1
You know the right answer?
Write a program that creates the following three files:. dataplus. txt. dataminus. txt. zeros. txtTh...

Questions in other subjects:

Konu
Mathematics, 05.07.2021 16:40