Advertisement
zh_stoqnov

Joro Football Player

Oct 23rd, 2014
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Joro__the_Football_Player
  4. {
  5. class JoroFootballPlayer
  6. {
  7. public static void Main(string[] args)
  8. {
  9. string leap = Console.ReadLine();
  10. int p = int.Parse(Console.ReadLine());
  11. int h = int.Parse(Console.ReadLine());
  12. int weekends = 52;
  13. double hometownPlays = (double)h;
  14. double normalPlays = (double)((weekends - hometownPlays) * 2) / 3;
  15. double holidayPlays = (double)p / 2;
  16. double allPlays = hometownPlays + normalPlays + holidayPlays;
  17. int allPlaysRounded = (int)Math.Floor(allPlays);
  18. if (leap == "t")
  19. {
  20. allPlaysRounded += 3;
  21. }
  22. Console.WriteLine(allPlaysRounded);
  23.  
  24. }
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement