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