Drivers are concerned with the mileage their automobiles


Drivers are concerned with the mileage their automobiles get. One driver has kept track of several tankfuls of gasoline by recording the miles driven and gallons used for each tankful. Develop a program in C++ that will input the miles driven and gallons used (both as integers) for each tankful. The program should calculate and display the miles per gallon obtained for each tankful and calculate and print the combined miles per gallon obtained for all tankfuls up to this point. All averaging calculations should produce floating-point results. Use class Scanner and sentinel-controlled repetition to obtain the data from the user.

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Drivers are concerned with the mileage their automobiles
Reference No:- TGS0135896

Expected delivery within 24 Hours