Question: Please use a C + + CODE FORMAT I NEED HELP!!!! Do not copy a code already posted on chegg its not the same and
Please use a C CODE FORMAT I NEED HELP!!!! Do not copy a code already posted on chegg its not the same and i will thumbs down. #include
#includeUsing Files Numeric Processing
In assignment you worked with a file called Numbers.txt and were required to do
a few different calculations. You will do the same with this problem but through
the incorporation of functions.
You should have a function that asks the user for the file to use.
You should have a function that counts the amount of numbers that are in the
file and displays it on the screen.
You should have a function that calculates the average of the first numbers
in the file and displays it on the screen.
You should have a function that provides the sum of the first numbers in the
file and displays it on the screen.
You should have a function that determines the lowest value in the file and
displays it on the screen.
You should have a function that determines the maximum number in the file
and displays it on the screen.
Remember that once you have read through a file you must close it and reopen it to
read it again.
Using namespace std;
Int main
Ifstream inputFile; file stream object
Int number;
inputFile.opennumberstxt;
if inputFile
cout Error opening file.
;
else
While inputFile number
Cout number endl;
inputFile.close;
Return ;
NUMBERS.TXT FILE
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
