Answered You can hire a professional tutor to get the answer.

QUESTION

In many of today's automobiles, it will display the current miles per gallon for the vehicle. In this program, the miles per gallon of gas will be...

In many of today's automobiles, it will display the current miles per gallon for the vehicle. In this program, the miles per gallon of gas will be calculated. For a car with a 16-gallon gas tank, it averages 345 miles per tankful when driven in town and 460 miles per tankful when driven on the highway. Write a program that calculates and displays the miles per gallon for one tank of gas when driven in town and when driven on the highway. There is no input from the user so the above values are just assigned to variables declared in the program. There should be a variable for the tank size (gallons), miles in town, miles on the highway and the calculated MPG. The MPG should have a data type of a double and the output should show decimal places.

MPG = Total number of Miles / Number of Gallons

Pseudocode must be provided in the comment block at the top of the file.

Here is my first assignment, utilizing Visual studios 2019 community edition having to use c++, while attempting to write the program I seem to develop several errors. This is my first time trying to develop a program and seems very cool just having a rough time getting started. The very many tutorials I have watched in my course curriculum still gave me errors and are vey outdated. looking to start with a solid initial program that i can use for future purposes as a reflection from start to finish. Thanks in advance!!!

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question