Advertisement
Atanasov_88

Percentage

Jul 12th, 2015
587
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.19 KB | None | 0 0
  1. using System;
  2.  
  3.     class Program
  4.     {
  5.         static void Main()
  6.         {
  7.             double fieldGoals = double.Parse(Console.ReadLine());
  8.             double FielGoalsAttempts = double.Parse(Console.ReadLine());
  9.             double ThreePointGoals = double.Parse(Console.ReadLine());
  10.             double turnouvers = double.Parse(Console.ReadLine());
  11.             double OffensivaRedBounds = double.Parse(Console.ReadLine());
  12.             double ooP = double.Parse(Console.ReadLine());
  13.             double FreeThrows = double.Parse(Console.ReadLine());
  14.             double freeThrowAttempts = double.Parse(Console.ReadLine());
  15.  
  16.             double eFG = (fieldGoals + (0.5 * ThreePointGoals)) / FielGoalsAttempts;
  17.  
  18.             double tOV = turnouvers / (FielGoalsAttempts + 0.44 * freeThrowAttempts + turnouvers);
  19.  
  20.             double oRB = OffensivaRedBounds / (OffensivaRedBounds + ooP);
  21.  
  22.             double factorResult = FreeThrows / FielGoalsAttempts;
  23.  
  24.             Console.WriteLine("eFG% {0:F3} ", eFG);
  25.             Console.WriteLine("TOV% {0:F3} ", tOV);
  26.             Console.WriteLine("ORB% {0:F3} ", oRB);
  27.             Console.WriteLine("FT% {0:F3} ", factorResult);
  28.         }
  29.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement