Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace LunchBreak
- {
- class Program
- {
- static void Main()
- {
- string serialName = Console.ReadLine();
- int serialTime = int.Parse(Console.ReadLine());
- int breakTime = int.Parse(Console.ReadLine());
- double neededTime = breakTime / 8.0 + breakTime / 4.0 + serialTime;
- if (neededTime <= breakTime)
- {
- Console.WriteLine($"You have enough time to watch {serialName} " +
- $"and left with {breakTime - Math.Floor(neededTime)} minutes free time.");
- }
- else
- {
- Console.WriteLine($"You don't have enough time to watch {serialName}," +
- $" you need {Math.Ceiling(neededTime) - breakTime} more minutes.");
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment