Question: C++ program Solve it quickly 8) a) Create a file containing the following car numbers, number of miles driven, and number of gallons of gas

 C++ program Solve it quickly 8) a) Create a file containingC++ program
Solve it quickly

8) a) Create a file containing the following car numbers, number of miles driven, and number of gallons of gas used by each car (do not include the headers): Car No Miles Driven Gallons Used 54 62 71 85 97 250 525 123 1322 235 19 38 86 14 b) Write a C+ program that reads the data in the file created in Question-Sa and displays the car number, miles driven, gallons used, and the miles per gallon for each car. The output should also display the total miles driven, total gallons used, and average miles per gallon for all the cars. These totals should be displayed at the end of the output report as shown below r No. Miles Driven Galloms Used Miles Gal1om 258 3.1579 13.8158 20.5 15.3721 16 7852 19 38 62 123 1322 235 86 14 85 Total niles drive 2455 Total gallons used 163 Average niles per gallon for all cars 15.1613 ress any key to continue

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