Advertisement
Liliana797979

fish market

Nov 28th, 2020
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function fishMarket(arg1, arg2, arg3, arg4, arg5) {
  2.     let mackerelPriceKg = Number(arg1);
  3.     let tsakaPriceKg = Number(arg2);
  4.     let bonitoKg = Number(arg3);
  5.     let horseMackerelKg = Number(arg4);
  6.     let musselsKg = Number(arg5);
  7.  
  8.     let bonitoSum = bonitoKg * 11.04;
  9.     let horseMackerelSum = horseMackerel * 7.56;
  10.     let musselsSum = musselsKg * 7.50;
  11.     let totalSum = bonitoSum + horseMackerelSum + musselsSum;
  12.  
  13.     console.log(totalSum.toFixed(2));
  14. }
  15.  
  16. fishMarket(6.90, 4.20, 1.5, 2.5, 1);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement