fbinnzhivko

01.00 Four Factors

May 4th, 2016
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.82 KB | None | 0 0
  1. using System;
  2. class Program
  3. {
  4.     static void Main()
  5.     {
  6.         decimal FG = decimal.Parse(Console.ReadLine());
  7.         decimal FGA = decimal.Parse(Console.ReadLine());
  8.         decimal P3 = decimal.Parse(Console.ReadLine());
  9.         decimal TOV = decimal.Parse(Console.ReadLine());
  10.         decimal ORB = decimal.Parse(Console.ReadLine());
  11.         decimal OppORB = decimal.Parse(Console.ReadLine());
  12.         decimal FT = decimal.Parse(Console.ReadLine());
  13.         decimal FTA = decimal.Parse(Console.ReadLine());
  14.  
  15.         decimal EFG = (FG + (decimal)0.5 * P3) / FGA;
  16.         decimal TOVV = TOV / (FGA + (decimal)0.44 * FTA + TOV);
  17.         decimal ORBB = ORB / (ORB + OppORB);
  18.         decimal FTT = FT / FGA;
  19.  
  20.         Console.WriteLine("eFG% {0:f3}\nTOV% {1:f3}\nORB% {2:f3}\nFT% {3:f3}", EFG, TOVV, ORBB, FTT);
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment