C++ calculate average and standard deviation
<p>I have this program where it asks a user how many values the user will enter in, asks for the values and puts them into a vector.  Then I need to calculate the average and standard deviation.
I have the average part but it looks like something is wrong and I get the wrong average.  And im not too sure how to get started on the standard deviation part.</p>

<pre><code>#include &lt;iostream&gt;
#include &lt;vector&gt;
#include &lt;cmath&gt;

using namespace std;

int main()
{
    // Create vector
    vector&lt;double&gt; values;

    // Declare variables
    double count;
    double value;
    double average;
    double stdDev;

    // Prompt user and get the number of values
    cout &lt;&lt; "How many values will you enter?\n";
    cin &gt;&gt; count;

    // Get the values from user and calculate average
    for( double i = 1; i&lt;= count; i++)
    {
        cin &gt;&gt; value;
        values.push_back(value);
        average+=values[i];
    }
    cout &lt;&lt; average/count &lt;&lt; '\n';

    //Calculate standard deviation


    return 0;
}
</code></pre>

<p>any help is appreciated.</p>