Advertisement
kzborisov

firm

Sep 22nd, 2018
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 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. int hoursNeeded = int.Parse(Console.ReadLine());
  14. int days = int.Parse(Console.ReadLine());
  15. int workers = int.Parse(Console.ReadLine());
  16.  
  17. double workDays = days * 0.9;
  18. double workHours = workDays * workers * (8 + 2);
  19. workHours = Math.Floor(workHours);
  20.  
  21. if (workHours >= hoursNeeded)
  22. {
  23. Console.WriteLine("Yes!{0} hours left.", workHours - hoursNeeded);
  24. }
  25. else
  26. {
  27. Console.WriteLine("Not enough time!{0} hours needed.", hoursNeeded - workHours);
  28. }
  29. }
  30. }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement