Question: Write a C++ program for reading information from a data file and saving a summary report into another data file for the average value, the

Write a C++ program for reading information from a data file and saving a summary report into another data file for the average value, the maximum value, and the minimum value. A data file named 'price.dat? that contains the price of different items, the first record in the price data file contains an integer that specifies the number of records that follow. Each of the following lines contains an id and the corresponding price

10 1000.25 55.25 9999.99 33.45 2000.00 1588.88 1699.99 14898.25 13734.21 13523.24 4 10 The output of the problems should be saved into another data file, named Output.dat. With the following data Number of price readings: 10 Maximum price: 14898.30 Minimum price: 33.45 Average price: 5853.35

SAWNER 10 1 2 4 5 6 7 8 9 10 1000.25 55.25 9999.99 33.45 2000.00 1588.88 1699.99 14898.25 13734.21 13523.24 The output of the problems should be saved into another data file, named 'Output.dat'. With the following data: Number of price readings: 10 Maximum price: 14898.30 Minimum price: 33.45 Average price: 5853.35

Step by Step Solution

3.39 Rating (146 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To solve this problem we need to create a C program that reads a data file calculates the average maximum and minimum prices and writes these values i... 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!