Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class Volleyball
- {
- static void Main(string[] args)
- {
- string year = Console.ReadLine();
- int p = int.Parse(Console.ReadLine());
- int h = int.Parse(Console.ReadLine());
- double weekends = 48 - h;
- double volleyballDays = weekends * 0.75;
- volleyballDays = volleyballDays + h;
- double holidays = p * (2.0 / 3);
- volleyballDays = volleyballDays + holidays;
- if (year == "leap")
- {
- volleyballDays = volleyballDays * 1.15;
- }
- Console.WriteLine(Math.Truncate(volleyballDays));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement