Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
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