Advertisement
Spocoman

Cat Walking

Nov 24th, 2021 (edited)
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.79 KB | None | 0 0
  1. using System;
  2.  
  3. namespace CatWalking
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             int walkMinutes = int.Parse(Console.ReadLine());
  10.             int walksQuantity = int.Parse(Console.ReadLine());
  11.             int caloriesConsumed = int.Parse(Console.ReadLine());
  12.             int burnedCaloriesPerDay = walkMinutes * walksQuantity * 5;
  13.  
  14.             if (burnedCaloriesPerDay >= caloriesConsumed / 2)
  15.             {
  16.                 Console.WriteLine($"Yes, the walk for your cat is enough. Burned calories per day: {burnedCaloriesPerDay}.");
  17.             }
  18.             else
  19.             {
  20.                 Console.WriteLine($"No, the walk for your cat is not enough. Burned calories per day: {burnedCaloriesPerDay}.");
  21.             }
  22.         }
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement