Advertisement
YankoZlatanov

Volleyball

Nov 13th, 2014
380
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.61 KB | None | 0 0
  1. using System;
  2.  
  3. class Volleyball
  4. {
  5.     static void Main()
  6.     {
  7.         string year = Console.ReadLine();
  8.         double holidays = double.Parse(Console.ReadLine());
  9.         double hometown = int.Parse(Console.ReadLine());
  10.         double weekends = 48;
  11.         double normalWeekends = (weekends - hometown) * (3.0 / 4.0);
  12.         double play = (holidays * (2.0 / 3.0) + normalWeekends);
  13.         if (year == "leap")
  14.         {
  15.             play = play + (play * 0.15) + hometown;
  16.         }
  17.         else
  18.         {
  19.             play = play + hometown;
  20.         }
  21.         Console.WriteLine((int)play);
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement