Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace tomCat
- {
- class Program
- {
- static void Main(string[] args)
- {
- int Howmanyfreedays = int.Parse(Console.ReadLine());
- int normPlay = 30000;
- int yearDays = 365;
- int yearWorkDays = yearDays - Howmanyfreedays;
- int freeDays = Howmanyfreedays * 127;
- int workDays = yearWorkDays * 63;
- int allMinutes = freeDays + workDays;
- int playMinutes = normPlay - allMinutes;
- int hours = playMinutes / 60;
- int minutes = playMinutes % 60;
- if (playMinutes > normPlay)
- {
- Console.WriteLine("Tom will run away");
- Console.WriteLine($" hours hours and minutes minutes more less for play");
- }
- else if (playMinutes < normPlay)
- {
- Console.WriteLine($"Tom sleeps well");
- Console.WriteLine($"{hours}hours and {minutes}minutes more for play");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment