Guest User

Untitled

a guest
Jun 24th, 2018
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. #include <cstdlib>
  2. #include <iostream>
  3. #include <cmath>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9. const int W = 2; // Naming each int value
  10. const int X = 3;
  11. const int Y = 4;
  12. const int Z = 5;
  13.  
  14. double MEAN = (2 * 3 * 4 * 5) / 4; // Calculating the mean for the
  15. // four int numbers
  16. cout << "The mean is " << MEAN << endl;
  17. int holder=0;
  18. for(n=1;n<5;n++)
  19. {
  20. MEAN = MEAN - n;
  21. double WDEVIATION = sqrt(pow(MEAN,2) / 3);
  22. float deviation=WDEVIATION+holder;
  23. holder=WDEVIATION;
  24. }
  25. cout << "The standard deviation is " << WDEVIATION << endl;
  26.  
  27.  
  28. system("PAUSE");
  29. return EXIT_SUCCESS;
  30. }
Add Comment
Please, Sign In to add comment