Question: 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

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 C# app that will input the miles driven and gallons used (both as integers) for each tankful. The app should calculate and display the miles per gallon obtained for each tankful and display the combined miles per gallon obtained for all tankfuls up to this point. All averaging calculations should produce floating-point results. Display the results rounded to the nearest hundredth. Use the Console class’s Read Line method and sentinel-controlled iteration to obtain the data from the user.

Step by Step Solution

3.46 Rating (179 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Top Determine the current and combined milesgallon for each trip First refinement Initialize va... 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 Visual C How Program Questions!