Advertisement
Krum_50

Lunchbreak

Jan 19th, 2022
650
241 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2.  
  3. namespace Lunchbreak
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             string nameOfSerial = Console.ReadLine();
  10.             int dauertOfEpizod = int.Parse(Console.ReadLine());
  11.             int timeOfBreak = int.Parse(Console.ReadLine());
  12.             double restTime = 5 * timeOfBreak / 8;
  13.             double different =Math.Ceiling(Math.Abs(restTime-dauertOfEpizod));
  14.             if (restTime>=dauertOfEpizod)
  15.             {
  16.                 Console.WriteLine($"You have enough time to watch {nameOfSerial} and left with {different} minutes free time.");
  17.             }
  18.             else
  19.             {
  20.                 Console.WriteLine($"You don't have enough time to watch {nameOfSerial}, you need {different} more minutes.");
  21.             }
  22.         }
  23.     }
  24. }
  25.  
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement