Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Volleyball
- {
- class Program
- {
- static void Main(string[] args)
- {
- string yearType=Console.ReadLine();
- double holidays = double.Parse(Console.ReadLine());
- double weekends = double.Parse(Console.ReadLine());
- double weekendsInSofia = (48.0-weekends)*(3.0/4.0);
- double holidaysInSofia = holidays * (2.0 / 3.0);
- double result = holidaysInSofia + weekendsInSofia + weekends;
- switch (yearType)
- {
- case "normal":
- Console.WriteLine(Math.Floor(result));
- break;
- case "leap":
- result = result + result * 0.15;
- Console.WriteLine(Math.Floor(result));
- break;
- default:
- break;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment