Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace _12_Volleyball
- {
- class Program
- {
- static void Main(string[] args)
- {
- string typeyear = Console.ReadLine().ToLower();
- double holidays = double.Parse(Console.ReadLine());
- double weekendhome = double.Parse(Console.ReadLine()); // plays at home on sunday (1 day)
- double insofiaweekend = 48 - weekendhome; //weekends in sofia (total) weekends total - weekends home
- double offworkweekends = insofiaweekend * 3 / 4; // weekends in sofia (no work), plays saturday (1 day)
- double holidayplay = holidays * 2 / 3; //total holidays play
- double totaldays = weekendhome + offworkweekends + holidayplay;
- switch (typeyear)
- {
- case "normal": Console.WriteLine(Math.Floor(totaldays)); break;
- case "leap": Console.WriteLine(Math.Floor(totaldays + (totaldays * 0.15))); break;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement