Advertisement
Guest User

JoroTheFootballPlayer

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