Question: Write a program that caloulates the fuel efliciency and average speed of an automoble. The program should take four inputs from the user: a. The

 Write a program that caloulates the fuel efliciency and average speed

Write a program that caloulates the fuel efliciency and average speed of an automoble. The program should take four inputs from the user: a. The odometer reading the last time the automobile's tank was filled. b. The current odometer reading. c. The amount of fuel in gallons to relill the tank "d. The number of hours the automoblle has been driven. The program should output the miles per gallon traveled by the automobile since the lost time its tank was filled and the average speed driven in miles per hour. Store the input values in vatiables of type doubte- The output should display fractional amounts to one decimal place Ex if the input is: 1087011000.8105.2 The output is The fuet effioiency ia 13.1 eniles por gallon. The average opeed is 25,2 milea per hour. \begin{tabular}{l|l} Wil \\ ucrmity & 219.1: LaB;Driving statisicics \end{tabular}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!