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 _12.Volleyball
- {
- class Program
- {
- static void Main(string[] args)
- {
- string typeYears = Console.ReadLine();
- int holidayYears = int.Parse(Console.ReadLine());
- int weekendTravelHome = int.Parse(Console.ReadLine());
- //////////София игри///////
- double numberWeekendSofia = 48 - weekendTravelHome;
- double gameWeekSofia = numberWeekendSofia * 3.0 / 4;
- //////////Роден град игри///////
- double gameWeekendHome = weekendTravelHome;
- double gameWeek = holidayYears * 2.0 / 3;
- ///////////////Сума////////////
- double result = gameWeek + gameWeekendHome + gameWeekSofia;
- switch (typeYears)
- {
- case "leap":
- var procent = 0.15;
- result = result + (procent * result);
- Console.WriteLine(Math.Truncate(result));
- break;
- default:
- Console.WriteLine(Math.Truncate(result));
- break;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment