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();
- double holidays = double.Parse(Console.ReadLine());
- double hometown = int.Parse(Console.ReadLine());
- double weekends = 48;
- double normalWeekends = (weekends - hometown) * (3.0 / 4.0);
- double play = (holidays * (2.0 / 3.0) + normalWeekends);
- if (year == "leap")
- {
- play = play + (play * 0.15) + hometown;
- }
- else
- {
- play = play + hometown;
- }
- Console.WriteLine((int)play);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement