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 issue12Voleyball
- {
- class Program
- {
- static void Main(string[] args)
- {
- string year = Console.ReadLine().ToLower();
- int holidays = int.Parse(Console.ReadLine());
- int traveling = int.Parse(Console.ReadLine());
- double Weekendsinsofia =48 - traveling;
- double sofiaplaytime =(Weekendsinsofia *(3.0/4));
- double AddedPlayHolidays = (holidays *(2.0/3));
- double AllPlayTime =sofiaplaytime + AddedPlayHolidays+traveling;
- double leapplaytime = AllPlayTime * 0.15;
- switch(year)
- {
- case "leap":
- Console.WriteLine("{0}", Math.Truncate(AllPlayTime+leapplaytime));
- break;
- case "normal":
- Console.WriteLine("{0}", Math.Truncate(AllPlayTime));
- break;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment