Advertisement
Guest User

Fuel Money

a guest
Sep 17th, 2021
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function fuelMoney(distance, passengers, price){
  2.     let fuel = (distance / 100) * 7;
  3.     fuel.toFixed(3);
  4.     fuel += passengers * 0.100;
  5.     let allPrice = fuel * price;
  6.     console.log(`Needed money for that trip is ${allPrice} lv.`)
  7. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement