Question: Instructions Write a trip cost calculator program. The java program should: Ask the user for the number of miles they are going to drive. Ask

Instructions
Write a trip cost calculator program. The java program should:
Ask the user for the number of miles they are going to drive.
Ask the user for the MPG of the vehicle.
Ask user for the price of gas per gallon.
Calculate how many gallons of gas will be needed and how much the trip will cost.
Display to the user how many gallons will be used and the total cost.

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!