### How do i put this in Standard deviation?

#include <iostream>
#include <cmath>
using namespace std;

int main()
{
float score_1 = 47;
float score_2 = 42;
float score_3 = 43;
float score_4 = 49;

float mean = mean;

float square_1;
float square_2;
float square_3;
float square_4;

//score_1 = sqrt (4 * 2.71 *(square_1 - square_1)^2) / 4 - 1;
//score_2 = sqrt (4 * 2.71 *(square_2 - square_2)^2) / 4 - 1;
//score_3 = sqrt (4 * 2.71 *(square_3 - square_3)^2) / 4 - 1;
//score_4 = sqrt (4 * 2.71 *(square_4 - square_4)^2) / 4 - 1;

mean = (score_1 + score_2 + score_3 + score_4)/4 - 1;

square_1 = (score_1 - mean);
square_1 = pow(score_1, 2);

square_2 = (score_2 - mean);
square_2 = pow(score_2, 2);

square_3 = (score_3 - mean);
square_3 = pow(score_3, 2);

square_4 = (score_4 - mean);
square_4 = pow(score_4, 2);

cout << "The mean of the scores is: " << mean << endl;

float stdDev;
//calculate stdDev

return 0;

}

Im suppose to have the mean come out with one decimal place, and have the standard deviation come out with four decimal places, but im not sure how to make it standard deviation
Topic archived. No new replies allowed.