daily pastebin goal
13%
SHARE
TWEET

Untitled

a guest Aug 15th, 2018 58 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
  1. using System;
  2.  
  3. namespace SoftuniRecepcion
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             int employee1 = int.Parse(Console.ReadLine());
  10.             int employee2 = int.Parse(Console.ReadLine());
  11.             int employee3 = int.Parse(Console.ReadLine());
  12.             int students = int.Parse(Console.ReadLine());
  13.  
  14.            
  15.             int studentsPerHour = employee1 + employee2 + employee3;
  16.             if (studentsPerHour != 0)
  17.             {
  18.                 double time = Math.Ceiling(students / (studentsPerHour * 1.00));
  19.                 if (time > 3)
  20.                 {
  21.                     time = 4 * time / 3;
  22.                 }
  23.  
  24.                 Console.WriteLine($"Time needed: {(int)time}h.");
  25.             }
  26.         }
  27.     }
  28. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top