fbinnzhivko

01. Joro The Football Player

Apr 27th, 2016
325
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.45 KB | None | 0 0
  1. using System;
  2. class Program
  3. {
  4.     static void Main()
  5.     {
  6.         string input = Console.ReadLine();
  7.         decimal a = decimal.Parse(Console.ReadLine());
  8.         decimal b = decimal.Parse(Console.ReadLine());
  9.  
  10.         decimal total = (((decimal)52 - b) * ((decimal)2 / (decimal)3)) + a / (decimal)2 + b;
  11.  
  12.         if (input == "t")
  13.         {
  14.             total = 3 + total;
  15.         }
  16.         Console.WriteLine("{0:f0}", Math.Floor(total));
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment