Advertisement
tockata

Joro the football player.

Jul 17th, 2014
387
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.53 KB | None | 0 0
  1. using System;
  2.  
  3. class JoroTheFootballPlayer
  4. {
  5.     static void Main()
  6.     {
  7.         string year = Console.ReadLine();
  8.         double p = double.Parse(Console.ReadLine());
  9.         double h = double.Parse(Console.ReadLine());
  10.         double count = 0;
  11.  
  12.         if (year == "f")
  13.         {
  14.             count = (0.5 * p) + (((52 - h) * 2) / 3) + h;
  15.         }
  16.         else if (year == "t")
  17.         {
  18.             count = (0.5 * p) + (((52 - h) * 2) / 3) + h + 3;
  19.         }
  20.  
  21.         Console.WriteLine(Math.Truncate(count));
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement