Advertisement
Guest User

Untitled

a guest
Nov 20th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. using System;
  2. class Volleyball
  3. {
  4. static void Main(string[] args)
  5. {
  6. string year = Console.ReadLine();
  7. int p = int.Parse(Console.ReadLine());
  8. int h = int.Parse(Console.ReadLine());
  9. double weekends = 48 - h;
  10.  
  11. double volleyballDays = weekends * 0.75;
  12. volleyballDays = volleyballDays + h;
  13. double holidays = p * (2.0 / 3);
  14. volleyballDays = volleyballDays + holidays;
  15. if (year == "leap")
  16. {
  17. volleyballDays = volleyballDays * 1.15;
  18. }
  19. Console.WriteLine(Math.Truncate(volleyballDays));
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement