Computer Science, asked by mallahsakshi123, 3 months ago

write a java program that takes the distance of the commute in kilometres the car fuel consumption rate in kilometres per gallon and the price of a gallon of petrol as input the program should then display the cost of the commute.


No irrelevant answers.

Answers

Answered by sreyasinharkl
1

Explanation:

Use your trip odometer to see how many miles you traveled total, then divide this by gallons to get your average fuel consumption. While this is the exact number of miles per gallon during your test period, it is a good estimate for your car's average fuel consumption.

I hope my answer helps you.

Similar questions