Advertisement
VickSuna

Untitled

Feb 18th, 2020
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. using System;
  2.  
  3. namespace _335_Firm
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. int neededHours = int.Parse(Console.ReadLine());
  10. int availableDays = int.Parse(Console.ReadLine());
  11. int numberOfEmployes = int.Parse(Console.ReadLine());
  12.  
  13. double workingHours = availableDays * 8 * 0.9;
  14. // Console.WriteLine( workingHours);
  15. double additionalHours = availableDays * numberOfEmployes * 2;
  16. // Console.WriteLine(additionalHours);
  17. double realHours = Math.Floor(workingHours + additionalHours);
  18. // Console.WriteLine(realHours);
  19. if (realHours >= neededHours)
  20. {
  21. Console.WriteLine($"Yes!{realHours - neededHours} hours left.");
  22. }
  23. else if (realHours < neededHours)
  24. {
  25. Console.WriteLine($"Not enough time!{neededHours - realHours} hours needed.");
  26. }
  27.  
  28.  
  29.  
  30.  
  31. }
  32. }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement