Advertisement
Liliana797979

cat walking vqrno reshenie

Dec 20th, 2020
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function catWalking(arg1, arg2, arg3) {
  2.     let minutesWalkingDay = Number(arg1);
  3.     let walkingCountDay = Number(arg2);
  4.     let caloriesDay = Number(arg3);
  5.  
  6.  
  7.     let minutes = walkingCountDay * minutesWalkingDay;
  8.     let totalCalories = minutes * 5;
  9.  
  10.  
  11.     if (totalCalories >= (caloriesDay * 0.5)) {
  12.  
  13.         console.log(`Yes, the walk for your cat is enough. Burned calories per day: ${totalCalories}.`);
  14.  
  15.     } else if (totalCalories < (caloriesDay * 0.5)) {
  16.  
  17.         console.log(`No, the walk for your cat is not enough. Burned calories per day: ${totalCalories}.`);
  18.     }
  19. }
  20.  
  21.  
  22. catWalking("30", "3", "300");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement