sivancheva

Firma

Apr 30th, 2017
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 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 Company
  8. {
  9. class company
  10. {
  11. static void Main(string[] args)
  12. {
  13. var neededHours = int.Parse(Console.ReadLine());
  14. var days = int.Parse(Console.ReadLine());
  15. var employees = int.Parse(Console.ReadLine());
  16.  
  17. var hoursReal = (days - 0.1 * days)*8; //realno vreme v 4asove za rabota
  18. var dopulnitelniHours = employees * 2 * days;
  19. var hoursRealTotal = hoursReal + dopulnitelniHours;
  20.  
  21. if (hoursRealTotal>= neededHours)
  22. {
  23. Console.WriteLine("Yes!{0} hours left.", Math.Floor(hoursRealTotal - neededHours));
  24. }
  25. else if (hoursRealTotal<neededHours)
  26. {
  27. Console.WriteLine("Not enough time!{0} hours needed.", Math.Floor(neededHours-hoursRealTotal));
  28. }
  29. }
  30. }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment