Liliana797979

Easter lunch viarno reshenie

Nov 27th, 2020
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function easterLunch(arg1, arg2, arg3) {
  2.     let cakesCount = Number(arg1);
  3.     let eggsCount = Number(arg2);
  4.     let cookies = Number(arg3);
  5.  
  6.     let cakesPrice = cakesCount * 3.20;
  7.     let eggsPrice = eggsCount * 4.35;
  8.     let cookiesPrice = cookies * 5.40;
  9.     let eggPaintPrice = eggsCount * 12 * 0.15;
  10.     let totalCost = cakesPrice + eggsPrice + cookiesPrice + eggPaintPrice;
  11.  
  12.     console.log(totalCost.toFixed(2));
  13. }
  14.  
  15. easterLunch(3, 2, 3);
Advertisement
Add Comment
Please, Sign In to add comment