Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cstdlib>
- #include <iostream>
- #include <cmath>
- using namespace std;
- int main()
- {
- const int W = 2; // Naming each int value
- const int X = 3;
- const int Y = 4;
- const int Z = 5;
- double MEAN = (2 * 3 * 4 * 5) / 4; // Calculating the mean for the
- // four int numbers
- cout << "The mean is " << MEAN << endl;
- int holder=0;
- for(n=1;n<5;n++)
- {
- MEAN = MEAN - n;
- double WDEVIATION = sqrt(pow(MEAN,2) / 3);
- float deviation=WDEVIATION+holder;
- holder=WDEVIATION;
- }
- cout << "The standard deviation is " << WDEVIATION << endl;
- system("PAUSE");
- return EXIT_SUCCESS;
- }
Add Comment
Please, Sign In to add comment