Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int daysOffWork = int.Parse(Console.ReadLine());
- int workDays = 365 - daysOffWork;
- int playtime = (daysOffWork * 127) + (workDays * 63);
- int remainingPlaytimeHours = Math.Abs(30000-playtime) / 60;
- int RemainingPlaytimeMinutes = Math.Abs(30000-playtime) % 60;
- if (playtime < 30000)
- {
- Console.WriteLine("Tom sleeps well");
- Console.WriteLine($"{remainingPlaytimeHours} hours and {RemainingPlaytimeMinutes} minutes less for play");
- }
- else
- {
- Console.WriteLine("Tom will run away");
- Console.WriteLine($"{remainingPlaytimeHours} hours and {RemainingPlaytimeMinutes} minutes more for play");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement