Advertisement
stefkay

JoroTheFootballPlayer

Sep 4th, 2015
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.98 KB | None | 0 0
  1. using System;
  2.  
  3. class JoroTheFootballPlayer
  4. {
  5.     static void Main()
  6.     {
  7.         string year = Console.ReadLine(); // "t" is leap year, "f"  is normal year
  8.         double holidays = double.Parse(Console.ReadLine());
  9.         double hometownWeekends = double.Parse(Console.ReadLine());
  10.  
  11.         double totalWeekends = 52;
  12.         double normalWeekends = totalWeekends - hometownWeekends;
  13.         double notTiredWeekends = (normalWeekends * 2 / 3);
  14.         double holidayPlays = holidays / 2;
  15.         double totalPlays;
  16.  
  17.         if (year == "t")
  18.         {
  19.             totalPlays = holidayPlays + notTiredWeekends + hometownWeekends + 3;
  20.             Console.WriteLine("{0}", (int)totalPlays);
  21.         }
  22.         else if (year == "f")
  23.         {
  24.             totalPlays = holidayPlays + notTiredWeekends + hometownWeekends;
  25.             Console.WriteLine("{0}", (int)totalPlays);
  26.         }
  27.         else
  28.         {
  29.             Console.WriteLine("Wrong Input");
  30.         }
  31.     }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement