Question
C# Drivers are concerned with the mileage their automobile gets. one driver has kept track of several tankfuls of gasoline by recording the miles driven
C#
Drivers are concerned with the mileage their automobile gets. 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 miles driven and gallons used (both are 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 calculation should produce floating-point results. Display the results rounded to the nearest hundreth using ":N2" string format. Use the console class' ReadLine() method and sentinel-controlled iteration to obtain data from the user. That is, you will need a way to end the loop.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started