Advertisement
dilyanyordanov

Volleyball

Apr 6th, 2016
390
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.14 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 Volleyball
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             var  year = Console.ReadLine().ToString();
  14.             var p = double.Parse(Console.ReadLine());
  15.             // Number of holidays which are not weekend days
  16.             var h = double.Parse(Console.ReadLine());
  17.             // Numbers of holidays in which VLadi travels to Kaspichan
  18.  
  19.             var playedDays = 0.00;
  20.             var weekendsInSofia = 48 - h;
  21.             var weekendsInKaspichan = h;
  22.  
  23.             if ( year == "leap")
  24.             {      
  25.                 playedDays = ((weekendsInSofia * 0.75) + h + (p * 2/3));
  26.                 var leapYear = Math.Floor(1.15 * playedDays) + playedDays;
  27.                Console.WriteLine("{0}", leapYear);      
  28.             }
  29.             else if (year == "normal")
  30.             {
  31.                 playedDays = Math.Floor((weekendsInSofia * 0.75) + h + (p * 2 / 3));
  32.                 Console.WriteLine("{0}", playedDays);
  33.  
  34.             }
  35.         }
  36.     }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement