Aliendreamer

volleyball

Feb 5th, 2017
351
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.07 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace issue12Voleyball
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             string year = Console.ReadLine().ToLower();
  14.             int holidays = int.Parse(Console.ReadLine());
  15.             int traveling = int.Parse(Console.ReadLine());
  16.             double Weekendsinsofia =48 - traveling;
  17.             double sofiaplaytime =(Weekendsinsofia *(3.0/4));
  18.             double AddedPlayHolidays = (holidays *(2.0/3));
  19.             double AllPlayTime =sofiaplaytime + AddedPlayHolidays+traveling;
  20.             double leapplaytime = AllPlayTime * 0.15;
  21.             switch(year)
  22.             {
  23.                 case "leap":
  24.                     Console.WriteLine("{0}", Math.Truncate(AllPlayTime+leapplaytime));
  25.                     break;
  26.                 case "normal":
  27.                     Console.WriteLine("{0}", Math.Truncate(AllPlayTime));
  28.                     break;
  29.  
  30.             }
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.         }
  44.     }
  45. }
Advertisement
Add Comment
Please, Sign In to add comment