1. ## Standard deviation

Code:
```//Here is what I got so far
#include <iostream>
using namespace std;

int main ()
{
int n, median;
double standarddeviation;
int num [31]={12, 13, 15, 16, 18, 19, 21, 34, 57, 32, 38, 213, 10, 14, 156, 172, 134, 143, 132, 139, 751, 30, 31, 81, 23, 41, 24, 51, 75, 91, 1234};
int sum= 0;
for (n=0; n<31; n++)
sum = sum+num [n];
double average=sum/31.0;
standarddeviation=(num[n]-average)*(num[n]-average);//I want to multiply every number by itself, subtract from the mean and son on but I can't seem to get it
cout<< sum<<endl;
cout<<average<<endl;
cout<<standarddeviation;
return 0;

}```

2. does this make your problem clearer?

Code:
```  for (n=0; n<31; n++)
{
sum = sum+num [n];
}
double average=sum/31.0;
standarddeviation=(num[n]-average)*(num[n]-average);//I want to multiply every number by itself, subtract from the mean and son on but I can't seem to get it```

3. Look at the standard deviation formula again. In no way does it involve an average as part of the calculation.
You also need to calculate the sum of the squares of the input data as well as just the sum of the input data.
Last of all, you will need the square root function.

4. Originally Posted by iMalc
Look at the standard deviation formula again. In no way does it involve an average as part of the calculation.
But it does, specifically, the mean.

5. Originally Posted by laserlight
But it does, specifically, the mean.
Well it's squared, that's what I meant.