Advertisement
Spocoman

Sea Trip

Sep 23rd, 2023
842
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function seaTrip(input) {
  2.     let foodPrice = Number(input[0]) * 3;
  3.     let souvenirPrice = Number(input[1]) * 3;
  4.     let dayHotelPrice = Number(input[2]);
  5.  
  6.     let hotelPrice = dayHotelPrice * 0.90 + dayHotelPrice * 0.85 + dayHotelPrice * 0.80;
  7.     let transportPrice = 210.0 * 2 / 100 * 7 * 1.85;
  8.  
  9.     console.log(`Money needed: ${(foodPrice + souvenirPrice + hotelPrice + transportPrice).toFixed(2)}`);
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement