title: Getting the Average of an Array
body: <p>I have this an assignment where the user has to enter in a name, then a score, and repeat that process until they are done, press Q, and then the array will show the names and scores, then give an average of all of those scores. What I have right now is this.</p>
  
  <pre><code>    static void inputPartInformation(string[] pl, double[] sc)
      {
  
          int i = 0;
  
          do
          {
              Console.Write("Enter The Player's Name: ");
  
              pl[i] = Console.ReadLine();
  
  
              Console.Write("Enter Their Score: ");
  
              sc[i] = double.Parse(Console.ReadLine());
  
          }
          while (pl[i++].CompareTo("Q") != 0);
  
      }
  
  
      static void displayParts(string[] pl, double[] sc)
      {
          int i = 0;
          while (pl[i].CompareTo("Q") != 0)
          {
              Console.WriteLine("{0,15}{1,6}", pl[i], sc[i]);
              ++i;
          }
  
      }
  
      static void Main(string[] args)
      {
  
          String[] players = new String[100];
  
          double[] scores = new double[100];
  
          inputPartInformation(players, scores);
  
  
  
          displayParts(players, scores);
  
  
          double average = scores.Average();
          Console.WriteLine("The Average is: {0}", average);
  
  
  
          Console.ReadLine();
  
      }
  </code></pre>
  
  <p>When I try to average the scores, it doesn't come out properly.</p>