Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class Volleyball
- {
- static void Main()
- {
- string year = Console.ReadLine();
- short p = short.Parse(Console.ReadLine());
- byte h = byte.Parse(Console.ReadLine());
- int weekendsInYear = 48;
- double nomalWeekEndsPlay = (weekendsInYear - h) * 0.75;
- double playingHolidays = p * 2 / 3.0;
- double totalPlays = nomalWeekEndsPlay + playingHolidays + h;
- if (year == "leap")
- {
- totalPlays += totalPlays *0.15;
- }
- Console.WriteLine(Math.Floor(totalPlays));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement