Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace deferredRest
- {
- class Program
- {
- static void Main(string[] args)
- {
- string series = Console.ReadLine();
- int episode = int.Parse(Console.ReadLine());
- int time = int.Parse(Console.ReadLine());
- double timeLunch = time / 8;
- double timeRecreation = time / 4;
- double restOfTheTime = time - timeLunch - timeRecreation;
- double timeFinal = episode - restOfTheTime;
- if(episode <= restOfTheTime)
- {
- Console.WriteLine($"You have enough time to watch {series} and left with {timeFinal} minutes free time.");
- }
- else if(episode > restOfTheTime)
- {
- Console.WriteLine($"You don't have enough time to watch {series}, you need {(episode - restOfTheTime)} more minutes.");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement