Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Bioinformatics Databases And Systems

Authors: Stanley I. Letovsky

1st Edition

1475784058, 978-1475784053

More Books

Students also viewed these Databases questions