Note - This is homework. Make a program that computes/outputs the mean and standard deviation of a set of four integers that are input by the user.
The problem I'm specifically asking about is how to calculate standard deviation in C++. The examples that I find of S.D. are either not very clear, or way beyond my level. (I know lots of errors, but I need the equation first.)
//***********
//Mean/Standard Deviation Program
//Computes and outputs mean and standard deviation of a set of four integer values input by a user.
//***********
#include <iostream>
usingnamespace std;
int main ()
{
//Defining input numbers, mean and standard deviation.
float numberOne <<
float numberTwo <<
float numberThree <<
float numberFour <<
float mean <<
float standardDeviation <<
//User inputs numbers.
cout << "Input your first number." << numberOne
cout << "Input your second number." << numberTwo
cout << "Input your third number." << numberThree
cout << "Input your fourth number." << numberFour
//Calculates mean.
mean = (numberOne + numberTwo + numberThree + numberFour) / 4
//Caculates standard deviation.
//Output of mean and standard deviation.
cin >> "The mean is " >> mean >> "and the standard deviation is " >> standardDeviation >> "." >> endl;
return 0;
}