Advertisement
EmoRz

Project

Jun 30th, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.73 KB | None | 0 0
  1. using System;
  2.  
  3. namespace TimeForProject
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             int time = int.Parse(Console.ReadLine());
  10.             int days = int.Parse(Console.ReadLine());
  11.             int workers = int.Parse(Console.ReadLine());
  12.             var workDays = days * 0.9*8;
  13.             var overTime = days * 2 * workers;
  14.             var workHours = Math.Truncate(overTime + workDays);
  15.  
  16.             if (workHours >= time)
  17.             {
  18.                 Console.WriteLine($"Yes!{workHours - time} hours left.");
  19.             }
  20.             else
  21.             {
  22.                 Console.WriteLine($"Not enough time!{time - workHours} hours needed. ");
  23.             }
  24.  
  25.         }
  26.     }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement