bacco

фирма : Firm

Jan 24th, 2018
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.78 KB | None | 0 0
  1. using System;
  2.  
  3. namespace dwdwdwdwDD
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             var hoursNeed = int.Parse(Console.ReadLine());
  10.             var days = int.Parse(Console.ReadLine());
  11.             var employees = int.Parse(Console.ReadLine());
  12.  
  13.             var hoursEmployees = (employees * (8 + 2) * days) - ((employees * (8 + 2) * days) * 0.10);
  14.             var difference = Math.Abs(hoursNeed - hoursEmployees);
  15.  
  16.             if (hoursNeed <= hoursEmployees)
  17.             {
  18.                 Console.WriteLine($"Yes!{difference} hours left.");
  19.             }
  20.             else if (hoursNeed > hoursEmployees)
  21.             {
  22.                 Console.WriteLine($"Not enough time!{difference} hours needed.");
  23.             }
  24.         }
  25.     }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment