Advertisement
Spocoman

Movie Profit

Feb 25th, 2022 (edited)
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function movieProfit(input) {
  2.     let movie = input[0];
  3.     let days = Number(input[1]);
  4.     let tickets = Number(input[2]);
  5.     let price = Number(input[3]);
  6.     let percent = Number(input[4]);
  7.  
  8.     let sum = days * tickets * price * (100 - percent) / 100;
  9.  
  10.     console.log(`The profit from the movie ${movie} is ${sum.toFixed(2)} lv.`);
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement