Advertisement
Liliana797979

vqrno reshenie na fish market

Nov 29th, 2020
81
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 bonitoPriceKg = mackerelPriceKg * 1.6;
  9.     let horseMackerelPriceKg = tsakaPriceKg * 1.8;
  10.     let musselsPriceKg = 7.5;
  11.  
  12.     let bonitoSum = bonitoKg * bonitoPriceKg;
  13.     let horseMackerelSum = horseMackerelKg * horseMackerelPriceKg;
  14.     let musselsSum = musselsKg * musselsPriceKg;
  15.     let totalSum = bonitoSum + horseMackerelSum + musselsSum;
  16.  
  17.     console.log(totalSum.toFixed(2));
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement