Question: Using c + + . In this exercise, you are to modify the Classify Numbers programming example in this chapter. As written, the program inputs
Using c In this exercise, you are to modify the Classify Numbers programming example in this chapter. As written, the program
inputs the data from the standard input device keyboard and outputs the results on the standard output device
screen The program can process only numbers. Rewrite the program to incorporate the following requirements:
Data to the program is input from a file of an unspecified length; that is the program does not know in advance
how many numbers are in the file.
Save the output of the program in a file.
Modify the function getNumber so that it reads a number from the input file opened in the function main outputs
the number to the output file opened in the function main and sends the number read to the function main.
Print only numbers per line.
Have the program find the sum and average of the numbers.
Modify the function printResult so that it outputs the final results to the output file opened in the function
main Other than outputting the appropriate counts, this new definition of the function printResult should also
output the sum and average of the numbers on their own line.
An example of the program's output file is shown below:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
