Question: Please write this Java program as simple as possible and with comments throughout explaining what is happening. Thanks (Cost of driving) Write a program that
(Cost of driving) Write a program that prompts the user to enter the distance to drive, the fuel efficiency of the car in miles per gallon, and the price per gallon, and displays the cost of the trip. Here is a sample run: *2.23 Enter the driving distance: 900.5-ent Enter miles per gallon: 25.5 Ete Enter price per gallon: 3.55 Enter The cost of driving is $125.36
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
