georgiev955

Untitled

Feb 7th, 2023
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. function catWalk([arg1, arg2, arg3]) {
  2. let walkTime = Number(arg1);
  3. let walkCount = Number(arg2);
  4. let caloriesIntake = Number(arg3);
  5. let dailyCaloriesBurned = walkTime*walkCount*5;
  6.  
  7. if (dailyCaloriesBurned >= caloriesIntake/2) {
  8. console.log(`Yes, the walk for your cat is enough. Burned calories per day: ${dailyCaloriesBurned}.`);
  9. } else {
  10. console.log(`No, the walk for your cat is not enough. Burned calories per day: ${dailyCaloriesBurned}.`);
  11. }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment