Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function chrismas(input) {
- let broiHartiq = Number(input[0]);
- let broiPlat = Number(input[1]);
- let broiLepilo = Number(input[2]);
- let percent = Number(input[3]);
- let hartiq = 5.80 * broiHartiq;
- let plat = 7.20 * broiPlat;
- let lepilo = 1.20 * broiLepilo;
- let total = hartiq + plat + lepilo;
- let percentFix = (100 - percent) / 100; // percent отстъпка от цената
- console.log((total * percentFix).toFixed(3));
- }
- chrismas(["4",
- "2",
- "5",
- "13"])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement