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 4 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 22 numbers
in the file and displays it on the screen.
You should have a function that provides the sum of the first 15 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 re-open it to
read it again.
Using namespace std;
Int main()
{
Ifstream inputFile; // file stream object
Int number;
inputFile.open(numbers.txt);
if (! inputFile)
cout Error opening file.
;
else
{
While (inputFile >> number)
{
Cout number endl;
}
inputFile.close();
}
Return 0;
} NUMBERS.TXT FILE 61653
26223
15212
25866
35242
25798
75315
35817
49564
14692
73793
39928
80255
41844
28759
67672
53028
34312
53527
61041
18153
27613
33492
62593
40786
57989
58103
83015
51296
20267
77799
45211

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!