title: Calculating the total and taking the average of numbers in an array
body: <p>Here is the question i need to solve:</p>
  
  <ol>
  <li>Find highest value of the 12 scores</li>
  <li>Find lowest value of the 12 scores</li>
  <li>Calculate the total of the 12 scores</li>
  <li>Subtract highest and lowest scores from the total</li>
  <li>Calculate average of 10 remaining scores by dividing total by 10</li>
  <li>Output average (formatted to 2 decimal places) </li>
  </ol>
  
  <p>This is what i have done so far,everything except the calculate total score and subract highest and lowest from total score and im not sure where im suppose to put the code and what code I'm suppose to use:</p>
  
  <p>double[] scores = { 8.7, 9.3, 7.9, 6.4, 9.6, 8.0, 8.8, 9.1, 7.7, 9.9, 5.8, 6.9 };</p>
  
  <pre><code>        Console.WriteLine("Numbers in the list:" + scores.Length);
  
          for (int index = 0; index &lt; scores.Length; index++)
          {
              Console.WriteLine(scores[index]);
          }
  
  
          //highest number
          double high = scores[0];
  
          for (int index = 1; index &lt; scores.Length; index++)
          {
              if (scores[index] &gt; high)
              {
                  high = scores[index];
              }
          }
  
          Console.WriteLine("Highest number =" + high);
  
          //lowest number
          double low = scores[0];
  
          for (int index = 1; index &lt; scores.Length; index++)
          {
              if (scores[index] &lt; low)
              {
                  low = scores[index];
              }
          }
  
          Console.WriteLine("lowest number =" + low);
  
          //average of the scores
          double total = 0;
          double average = 0;
  
          for (int index = 0; index &lt; scores.Length; index++)
          {
              total = total + scores[index];
          }
  
          average = (double)total / scores.Length;
  
          Console.WriteLine("Total=" + total);
          Console.WriteLine("Average=" + average.ToString("N2"));
          Console.ReadKey();
      }
  </code></pre>