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