This is “Truck Distance Calculator” designed to calculate the total fuel cost for a truck journey. The calculator requires the user to input three pieces of information:
- The distance of the journey in kilometers.
- The price of petrol per liter.
- The truck’s fuel efficiency in kilometers per liter.
Once the user inputs these values, they can click a button to calculate the total cost of petrol for the journey. The calculation is done by dividing the distance by the fuel efficiency to find out the total liters of petrol needed for the journey. Then, this amount is multiplied by the petrol price per liter to get the total cost.