Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function catWalking(arg1, arg2, arg3) {
- let minutesWalkingDay = Number(arg1);
- let walkingCountDay = Number(arg2);
- let caloriesDay = Number(arg3);
- let minutes = walkingCountDay * minutesWalkingDay;
- let totalCalories = minutes * 5;
- if (totalCalories >= (caloriesDay * 0.5)) {
- console.log(`Yes, the walk for your cat is enough. Burned calories per day: ${totalCalories}.`);
- } else if (totalCalories < (caloriesDay * 0.5)) {
- console.log(`No, the walk for your cat is not enough. Burned calories per day: ${totalCalories}.`);
- }
- }
- catWalking("30", "3", "300");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement