Question: Using the flowchart that was drawn for Homework 1 - 2 , write a program that calculates the number of miles per gallon a car

Using the flowchart that was drawn for Homework 1-2, write a program that calculates the number of miles per gallon a car gets. Prompt the user for miles driven and gallons of gas used. Accept the values using cin statements. Display the result on the screen. Make sure you use the appropriate data types.
Formula: MPG = Miles Driven / Gallon of Gas Used
Output:
Enter the Miles Driven: 100
Enter the Gas Used: 5
Miles Per Gallon: 20.00

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 Finance Questions!