Advertisement
Guest User

Untitled

a guest
Jul 20th, 2015
356
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.63 KB | None | 0 0
  1. using System;
  2.  
  3. class JoroTheFootballPlayer
  4. {
  5.     static void Main()
  6.     {
  7.         string leap = Console.ReadLine();
  8.         int hollidaysCount = int.Parse(Console.ReadLine());
  9.         int weekendsHomeCount = int.Parse(Console.ReadLine());
  10.  
  11.         int weekendsInYear = 52;
  12.         int normalWeekendsCount = weekendsInYear - weekendsHomeCount;
  13.         double gamesCount =
  14.             normalWeekendsCount * 2d / 3d +
  15.             weekendsHomeCount * 1d +
  16.             hollidaysCount / 2d;
  17.         if (leap == "t")
  18.         {
  19.             gamesCount = gamesCount + 3;
  20.         }
  21.         Console.WriteLine((int)gamesCount);
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement