Write a program that takes as input three numbers and outputs the mean (average) and standard deviation of the numbers. If the numbers are x1, x2, and x3, then the mean(average) is x=(x1+x2+x3)/3 and the standard deviation is :
Your program must contain at least the following functions: a function that calculates and returns the mean and a function that calculates the standard deviation.
int main () { cout << "Input your first number :" ; cin >> numberOne; cout << "Input your second number:" ; cin >> numberTwo; cout << "Input your third number :" ; cin >> numberThree;
cout << "The mean is " << mean << " and the standard deviation is " << calculatestandarddeviation() << "." << endl; int k; cin>>k; return 0; }
Comments
Leave a comment