You aren't using the std dev formula correctly.
See http://davidmlane.com/hyperstat/A16252.html
Also, here is an update to your code. Notice all the variables are declared at the top of main. Notice how the code is indented. The program is easier to read now.
Take care,
Bruce
#include <iostream>
#include <string>
#include <cmath>
using namespace std;
int main()
{
bool more = true;
int count = 0;
double sum = 0;
float num = 0.0;
double avg = 0;
double s_dev = 0;
cout << " Enter a value: (CTRL-D to quit): ";
cin >> num;
while (true)
{
++count;
cout << count << endl;
sum += num;
cout << " Enter a value: (CTRL-D to quit): ";
cin >> num;
if (cin.eof())
{
break;
}
}
avg = sum / count;
s_dev = sqrt((( pow(sum,2.0)) -(( 1.0/count) * (pow(sum,2.0)))) / (count - 1.0)
);
cout << endl << endl;
cout << " There are " << count << " values. " << endl;
cout << " The average is: " << avg << endl;
cout << " The standard deviation is: " << s_dev << endl;
return 0;
} OK. So the tab didn't copy real well, but you get the idea.