C++ Smallest Number in Array Not Displaying
<pre><code>#include &lt;iostream&gt;

using namespace std;

int main()
{  
    double sixty = 0.0;
    double fiftyfive = 0.0;
    double height[10];
    double tallest = 0.0;
    double shortest = 0.0;
    double average = 0.0;
    double total = 0.0;

    for (int x = 0; x &lt; 10; x = x + 1)
    {
        height[x] = 0.0;
    }

    cout &lt;&lt; "Please enter the heights of ten 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];
    }

    for (int x = 0; x &lt; 10; x = x + 1)
    {
        if (height[x] &gt; 60)
        {
           sixty = sixty + 1;
          }
    }
    for (int x = 0; x &lt; 10; x = x + 1)
    {
        if (height[x] &lt; 55)
        {
           fiftyfive = fiftyfive + 1;
        }
    }
    cout &lt;&lt; "The number of students over 60 inches in height: " &lt;&lt; sixty &lt;&lt; endl;
    cout &lt;&lt; "The number of students under 55 inches in height: " &lt;&lt; fiftyfive &lt;&lt; endl;

    for (int x = 0; x &lt; 10; x = x + 1)
    {
        if (height[x] &gt; tallest)
        {
                      tallest = height[x];
        }
    }
    cout &lt;&lt; "The tallest student is: " &lt;&lt; tallest &lt;&lt; endl;

    for (int x = 0; x &lt; 10; x = x + 1)
    {
        if (height[x] &lt; shortest)
        {
                      shortest = height[x];
        }
    }
    cout &lt;&lt; "The shortest student is: " &lt;&lt; shortest &lt;&lt; endl;

    for (int x = 0; x &lt; 10; x = x + 1)
    {
        total = total + height[x];
    }
    average = total / 10;
    cout &lt;&lt; "The average student height is: " &lt;&lt; average &lt;&lt; endl;   



    system("pause"); 
    return 0;
}
</code></pre>

<p>In the above, I need to spit out the # of students over 60in, the # of students over 55in, the average height, the tallest height, and the shortest height.</p>

<p>Everything works fine except for the shortest height. I return an output of zero for that portion of the code.</p>

<p>This is simple code so I imagine it's a simple problem which I'm overlooking. Any input is appreciated.</p>
