Question: Write a program which reads in the file, FleetInput.txt. I have given you a template for the program on the last page. The file is


Write a program which reads in the file, FleetInput.txt. I have given you a template for the program on the last page. The file is on Canvas in this week's module under Materials. The fields to read in are vehicleID, miles, gallons. Here are some of the lines in the file. 279BX6KY2Z 582.2 802MX8B240 723.6 671AY6DZ3N 756.9 20.5 25.1 27.5 Your program should produce a report like: MPG AMSCO Fleet Report Vehicle ID Miles Gallons 279BX6KY2Z 582.2 20.5 802MX 8BZ4Q 723.6 25.1 .. more lines 28.4 28.8... Count: 13 Total Miles: 6751.3 Average MPG: 22.5 Vehicle ID with Best MPG: Vehicle ID with worst MPG: 199QW2 RP2Y 12 2AC6UG7P 36.3 15.6 Put.cpp file in dropbox. #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
