Question: Can anyone please help me with this C++ question? 4.13 (Gas Milea 13 (Gas Mileage) Drivers are concerned with the mileage obrained by their a
Can anyone please help me with this C++ question? 4.13 (Gas Milea 13 (Gas Mileage) Drivers are concerned with the mileage obrained by their a driver has kept track of several trips by recording miles driven and gallo used for each trip. Devel he op a Ct+ program that uses a while statement to input the miles driven and gallons used for each trip. The program should calculate and display the miles per gallon obtained for each trip and print the combined miles per gallon obtained for all tankfuls up to this point. Enter miles driven (-1 to quit): 287 Enter gallons used: 13 MPG this trip: 22.076923 Total MPG: 22.076923 Enter miles driven (-1 to quit): 2 Enter gallons used: 10 MPG this trip: 20.000000 Total MPG: 21.173913 Enter the miles driven (-1 to quit): 120 Enter gallons used: 5 MPG this trip: 24.000000 Total MPG: 21.678571 Enter the miles used (-1 to quit): -1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
