Question: JAVA: Road Trip Budget: Write a utility program named Road Trip that reads: the mile-per-gallon rating of a car, the number of miles a
JAVA: Road Trip Budget: Write a utility program named Road Trip that reads: the mile-per-gallon rating of a car, the number of miles a trip will take, the price of a gallon of gasoline in pennies the budget for a car trip (also in pennies) The program displays the dollars and cents cost of the trip on one line and then on the next line prints either "in budget" "over budget" depending on whether the cost was less than or equal to the budget (in budget) or greater than the budget (over budget). Sample output: $29.42 in budget
Step by Step Solution
There are 3 Steps involved in it
Heres a Java solution to the given Road Trip Budget problem This program reads the inputs for milepe... View full answer
Get step-by-step solutions from verified subject matter experts
