Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function movieProfit() {
- let movieName = arguments[0];
- let days = Number(arguments[1]);
- let ticketCount = Number(arguments[2]);
- let ticketPrice = Number(arguments[[3]]);
- let percent = Number(arguments[4]);
- let sumForDay = ticketCount * ticketPrice;
- let totalSum = sumForDay * days;
- let cinemaProfit = totalSum * (percent / 100);
- let totalProfit = totalSum - cinemaProfit;
- console.log(`The profit from the movie ${movieName} is ${totalProfit.toFixed(2)} lv.`)
- }
- movieProfit("The Programmer", 20, 500, 7.50, 7);
Advertisement
Add Comment
Please, Sign In to add comment