title: Need help displaying values in a loop / array program C++
body: <p>I'm trying to write a program to count and display the heights of students taller than 60 inches.  For example:  I need it to count and display the number of students taller than 60 inches and display their respective heights.  I am unsure of how to store the separate values and display their height.  I have gotten the program to count the number of students taller than 60 inches, but I need help displaying their specific height.</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  using namespace std;
  
  int main()
  {
      double count60 = 0.0;
      double height[10];
      for (int x = 0; x &lt; 10; x = x + 1)
      {
          height[x] = 0.0;
      }
  
      cout &lt;&lt; "You are asked to enter heights of 10 students. "&lt;&lt; endl;
      for (int x = 0; x &lt; 10; x = x + 1)
      {
          cout &lt;&lt; "Enter height of a student: ";
          cin &gt;&gt; height[x];
      if (height[x] &gt; 60)
      {
          count60 = count60 + 1;
      }       
      }
  
      cout &lt;&lt; "The number of students taller than 60 inches: "&lt;&lt; count60 &lt;&lt; endl;
      cout &lt;&lt; "The heights of these students are: "
  
      system("pause"); 
      return 0;
  }
  </code></pre>