zh_stoqnov

Work Hours

Oct 16th, 2014
292
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Work_Hours
  4. {
  5. class WorkHours
  6. {
  7. public static void Main(string[] args)
  8. {
  9.  
  10. int h = int.Parse(Console.ReadLine());
  11.  
  12. int d = int.Parse(Console.ReadLine());
  13.  
  14. int p = int.Parse(Console.ReadLine());
  15. double leliaWorkDays = d - (d * 0.10);
  16. double leliaWorkHours = leliaWorkDays * 12;
  17. double leliaEfficientWorkHours = leliaWorkHours * ((Convert.ToDouble(p)) / 100);
  18. double leliaEfficientWorkHoursRounded = Math.Floor(leliaEfficientWorkHours);
  19. int leliaRoundedHoursInteger = Convert.ToInt32(leliaEfficientWorkHoursRounded);
  20. int difference = leliaRoundedHoursInteger - h;
  21. if(difference >= 0)
  22. {
  23. Console.WriteLine("Yes");
  24. }
  25. else
  26. {
  27. Console.WriteLine("No");
  28. }
  29. Console.WriteLine(difference);
  30.  
  31. }
  32. }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment