grach

Volley

Jul 12th, 2017
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.76 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 Volley
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {            
  13.             var year = Console.ReadLine();
  14.             var holidays = double.Parse(Console.ReadLine());
  15.             var ou = double.Parse(Console.ReadLine());
  16.  
  17.             var home = ((48 - ou) * (3.0 / 4));
  18.             var bank = holidays * ((2.0 / 3));
  19.            
  20.             switch (year)
  21.             {
  22.                 case "leap": Console.WriteLine(Math.Truncate((home + bank + ou) * 1.15)); break;
  23.  
  24.                 case "normal": Console.WriteLine(Math.Truncate((home + bank + ou))); break;
  25.             }
  26.  
  27.         }
  28.     }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment