Question: write in c++ Write a program that calculates the fuel efficiency and average speed of an automobile. The program should take four inputs from the

write in c++
write in c++ Write a program that calculates the fuel efficiency and

Write a program that calculates the fuel efficiency and average speed of an automobile. The program should take four inputs from the user. a. The colometer reading the last time the automobile's tark was filled. b the current odometer reading 0. The amount of fuel in gallons to refill the tank d. The number of hours the automobile has been driven The program should output the miles per gallon traveled by the automobile since the last time its tank was filled and the average speed driven in miles per hour. Store the input values in variables of type double. The output strould display fractional amounts to one decimal place Ex if the input is: 1087011000.8105.2 The output is: The fuel etfloiency is 13,1 miles per gallon. The average speed is 25.2 miles per hour. \begin{tabular}{l|l} wontiver \\ Netion: LAB Oriving otatistios \end{tabular} main.cpp Load default template

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!