Advertisement
Guest User

Untitled

a guest
Apr 14th, 2014
710
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 Exam01
  8. {
  9.     class Exam01
  10.     {
  11.         static void Main()
  12.         {
  13.             string leap = Console.ReadLine();
  14.             long p = long.Parse(Console.ReadLine());
  15.             long h = long.Parse(Console.ReadLine());
  16.             decimal days = 0;
  17.             days += h;
  18.             decimal normalWeekendPlays = ((48-h)/4.00m)*3;
  19.             days += normalWeekendPlays;
  20.             decimal holidayPlays = (p / 3.00m) * 2;
  21.             days += holidayPlays;
  22.             if (leap=="leap")
  23.             {
  24.                 days += (days / 100.00m) * 15;
  25.             }
  26.             Console.WriteLine((int)days);
  27.         }
  28.     }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement