grach

2016_August_28 Firm

Sep 3rd, 2017
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.84 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace Firm
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             var hours = int.Parse(Console.ReadLine());
  14.             var days = double.Parse(Console.ReadLine());
  15.             var workers = int.Parse(Console.ReadLine());
  16.  
  17.             var time = (days*0.9*8);
  18.             var adWorker = workers * (days * 2);
  19.             var projectTime = Math.Floor(time + adWorker);
  20.  
  21.  
  22.             if (projectTime >= hours)
  23.             {
  24.                 Console.WriteLine("Yes!{0} hours left.", projectTime-hours);
  25.             }
  26.  
  27.             else
  28.             {
  29.                 Console.WriteLine("Not enough time!{0} hours needed.", hours-projectTime);
  30.             }
  31.  
  32.         }
  33.     }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment