Question: Write a program that asks the user to enter their first name, last name, year, make, and model of their vehicle. Next, ask the user

Write a program that asks the user to enter their first name, last name, year, make, and model of their vehicle. Next, ask the user to enter the total miles driven in one (1) week and the number of gallons used. Calculate the car's miles-per-gallon (MPG). You may use the following formula to help you obtain the miles-per-gallon result:MPG = Miles driven / Gallons of gas usedDisplay the results in the following manner:Greetings, (first name, last name),For your (year, make, model), your weekly MPG is: (MPG)

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