Question: PLEASE USE JAVA Problem 6: Cost of Driving (CostOfDriving.java) Description: Write a program that prompts the user to enter the distance to drive, the fuel

PLEASE USE JAVA
Problem 6: Cost of Driving (CostOfDriving.java) Description: 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. Please format your output so that the output floating-point number is of scale of 2 (with 2 digits after the decimal point). $ java CostOfDriving Please enter the driving distance: 900.5 Please enter miles per gallon: 25.5 Please enter price per gallon: 3.55 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
