Advertisement
Spocoman

07. Food Delivery

Nov 30th, 2021 (edited)
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function foodDelivery(input){
  2.     let chickenMenu = Number(input[0]);
  3.     let fishMenu = Number(input[1]);
  4.     let vegetarianMenu = Number(input[2]);
  5.          
  6.     let sum = (chickenMenu * 10.35 + fishMenu * 12.40 + vegetarianMenu * 8.15) * 1.2 + 2.5;
  7.    
  8.     console.log(sum);
  9. }
  10.  
  11. Taрикатско решение:)
  12.  
  13. function foodDelivery(input){  
  14.     console.log((Number(input[0]) * 10.35 + Number(input[1]) * 12.40 + Number(input[2]) * 8.15) * 1.2 + 2.5);
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement