title: Array prints out wrong numbers
body: <p>I'm new to C++ and I have to make a program that lets the user enter a specified number of test scores and calculate the average, highest, and lowest scores. (It doesn't have to check if values are between 1 and 100.) For some reason, when it goes to print out the average score and sum of the scores, it just prints out random exponential numbers that are never the same. I haven't gotten to printing out the lowest and highest scores yet since I'm not sure if I'm even doing the average right. Again, I'm new to C++ so I'm sure I messed something up. Here's the code:</p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  int loopLimit = 0; //number of scores or how many times it will loop
  double *testScores = {0}; //array scores are stored in
  
  int main () {
      cout &lt;&lt; "How many test scores are you entering?" &lt;&lt; endl;
       cin &gt;&gt; loopLimit;
  
       testScores = new double[loopLimit]; //changes array to needed size
  
       for (int i = 0; i &lt; loopLimit; i++) {
           cout &lt;&lt; "Enter test score #" &lt;&lt; (i + 1) &lt;&lt; endl;
           cin &gt;&gt; *testScores;
       }
  
      double sum = 0.0;
      double average = 0.0;
      //double max = 0.0; //making these functions later
      //double min = 0.0; 
  
       sum += testScores[loopLimit];
       average = sum / loopLimit;
       //Sum is here for testing purposes at the moment
  
       cout &lt;&lt; "Sum = " &lt;&lt; sum &lt;&lt; " Average = " &lt;&lt; average &lt;&lt; endl;
  
       return 0; 
  }
  </code></pre>
  
  <p><strong>Example output 1:</strong></p>
  
  <pre><code>How many test scores are you entering?
  3
  Enter test score #1
  100
  Enter test score #2
  100
  Enter test score #3
  100
  Sum = 8.29874e-310 Average = 2.76625e-310
  </code></pre>
  
  <p><strong>Example output 2:</strong></p>
  
  <pre><code>How many test scores are you entering?
  3
  Enter test score #1
  100
  Enter test score #2
  100
  Enter test score #3
  100
  Sum = 8.94176e-310 Average = 2.98059e-310
  </code></pre>
  
  <p><strong>Expected output:</strong></p>
  
  <pre><code>How many test scores are you entering?
  3
  Enter test score #1
  100
  Enter test score #2
  100
  Enter test score #3
  100
  Sum = 300.0 Average = 100.0
  </code></pre>
  
  <p>I've been at this all week, and I honestly got nothing at this point.</p>