Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. using System;
  2.  
  3. namespace deferredRest
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. string series = Console.ReadLine();
  10. int episode = int.Parse(Console.ReadLine());
  11. int time = int.Parse(Console.ReadLine());
  12.  
  13. double timeLunch = time / 8;
  14. double timeRecreation = time / 4;
  15. double restOfTheTime = time - timeLunch - timeRecreation;
  16. double timeFinal = episode - restOfTheTime;
  17.  
  18. if(episode <= restOfTheTime)
  19. {
  20. Console.WriteLine($"You have enough time to watch {series} and left with {timeFinal} minutes free time.");
  21. }
  22. else if(episode > restOfTheTime)
  23. {
  24. Console.WriteLine($"You don't have enough time to watch {series}, you need {(episode - restOfTheTime)} more minutes.");
  25. }
  26.  
  27. }
  28. }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement