Advertisement
Sim0o0na

02. Cat Walking

Jun 18th, 2018
1,204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.97 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace CatWalking
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             int minutesWalking = int.Parse(Console.ReadLine());
  14.             int countWalking = int.Parse(Console.ReadLine());
  15.             int callories = int.Parse(Console.ReadLine());
  16.  
  17.             long allMinutesWalking = countWalking * minutesWalking;
  18.             long allCalloriesBurn = allMinutesWalking * 5;
  19.  
  20.             if (allCalloriesBurn >= (callories * 0.5))
  21.             {
  22.                 Console.WriteLine("Yes, the walk for your cat is enough. Burned calories per day: {0}.", allCalloriesBurn);
  23.             }
  24.             else if (allCalloriesBurn < (callories * 0.5))
  25.             {
  26.                 Console.WriteLine("No, the walk for your cat is not enough. Burned calories per day: {0}.", allCalloriesBurn);
  27.             }
  28.         }
  29.     }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement