Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function catWalking(input) {
- let walkMinutes = Number(input[0]),
- walksQuantity = Number(input[1]),
- caloriesConsumed = Number(input[2]),
- burnedCaloriesPerDay = walkMinutes * walksQuantity * 5;
- if (burnedCaloriesPerDay >= caloriesConsumed / 2) {
- console.log(`Yes, the walk for your cat is enough. Burned calories per day: ${burnedCaloriesPerDay}.`);
- } else {
- console.log(`No, the walk for your cat is not enough. Burned calories per day: ${burnedCaloriesPerDay}.`);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement