Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace exampreparation
- {
- class exam
- {
- static void Main(string[] args)
- {
- string series = Console.ReadLine();
- int duration = int.Parse(Console.ReadLine());
- int breakDuration = int.Parse(Console.ReadLine());
- double lunchTime = breakDuration / 8.0;
- double breakTime = breakDuration / 4.0;
- double restTime = breakDuration - (lunchTime + breakTime);
- if (restTime >= duration)
- {
- Console.WriteLine($"You have enough time to watch {series} and left with {Math.Ceiling(restTime-duration)} minutes free time.");
- }
- else
- {
- Console.WriteLine($"You don't have enough time to watch {series}, you need {Math.Ceiling(duration-restTime)} more minutes.");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement