Advertisement
Spocoman

Cat Walking

Sep 16th, 2023 (edited)
675
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.58 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7.    int walkMinutes, walksQuantity, caloriesConsumed;
  8.    cin >> walkMinutes >> walksQuantity >> caloriesConsumed;
  9.  
  10.     int burnedCaloriesPerDay = walkMinutes * walksQuantity * 5;
  11.  
  12.     if (burnedCaloriesPerDay >= caloriesConsumed / 2) {
  13.         cout << "Yes, the walk for your cat is enough. Burned calories per day: " << burnedCaloriesPerDay << endl;
  14.     }
  15.     else{
  16.         cout << "No, the walk for your cat is not enough. Burned calories per day: " << burnedCaloriesPerDay << endl;
  17.     }
  18.  
  19.     return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement