Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function fishLand(input) {
- let mackerelPrice = Number(input.shift());
- let spratPrice = Number(input.shift());
- let bonitoFishKg = Number(input.shift());
- let saffronKg = Number(input.shift());
- let shellKg = Number(input.shift());
- let bonitoFishSum = bonitoFishKg * mackerelPrice * 1.60;
- let saffronSum = saffronKg * spratPrice * 1.80;
- let shellSum = shellKg * 7.50;
- let sum = bonitoFishSum + saffronSum + shellSum;
- console.log(`${sum.toFixed(2)}`);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement