Advertisement
Kamigawa

Untitled

Oct 7th, 2014
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Problem_13.Work_Hours
  4. {
  5. class Program
  6. {
  7. static void Main()
  8. {
  9. decimal h = int.Parse(Console.ReadLine());
  10. decimal d = int.Parse(Console.ReadLine());
  11. decimal p = int.Parse(Console.ReadLine());
  12. decimal bikingTime = d / 10;
  13. decimal FinalDays = d - bikingTime;
  14. decimal pInpercentage = p / 100;
  15. decimal FinalProduction = FinalDays * 12 * pInpercentage;
  16. int dif = (int)FinalProduction - (int)h;
  17.  
  18. if (dif >= 0)
  19. {
  20. Console.WriteLine("Yes");
  21. Console.WriteLine(dif);
  22. }
  23. else
  24. {
  25. Console.WriteLine("No");
  26. Console.WriteLine(dif);
  27. }
  28.  
  29. }
  30. }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement