Question: Use the file below: Write a program to read data from input file. The first value read is the number of numbers to be read

Use the file below: Write a program to read data from input file. The first value read is the number of numbers to be read next. Calculate average of those numbers and write to an output file the numbers read and the average. Repeat this process until end of file. Use of member function,

Sample of input file: NAME YOUR FILE

" Lab4input.dat" for input file

"Lab4output.dat" for output file

4 12 14 99 83 5 2 9 56 4 3 2 13 15 1 6 8 32 12 3 4 5 12 34 45

Output should look like this:

12 14 99 83

Number of numbers read=4

Average=52

Step by Step Solution

3.49 Rating (159 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To solve this problem lets write a stepbystep program in a language like C to read from Lab4inputdat process the data and write the result to Lab4outp... View full answer

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 Programming Questions!