Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function fishLand(input) {
- let mackerelPrice = parseFloat(input[0]);
- let spratPrice = parseFloat(input[1]);
- let bonitoFishKg = parseFloat(input[2]);
- let saffronKg = parseFloat(input[3]);
- let shellKg = parseFloat(input[4]);
- 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