Hey Fox... i wrote the program for finding the Mean of 4 integers (Thanks to Daniweb members) now im faced to also get the standard deviation of those numbers x=sqrt(X1+X2+X3+X4)/3 here's what i've come up with so far...
#include <iomanip>
#include <iostream>
#include <cmath>
using namespace std;
int main(void)
{
int X1;
int X2;
int X3;
int X4;
int Sol1;
int Sol2;
double sqrt;
cout<<"Enter The First Integer value:";
cin>>X1;
cout<<"Enter The Second Integer Value:";
cin>>X2;
cout<<"Enter The Third Integer Value:";
cin>>X3;
cout<<"Enter The Forth Integer Value:";
cin>>X4;
{
Sol1=(X1+X2+X3+X4)/4.0;
cout<<"The Result is:";
Sol2=sqrt(double)(X1+X2+X3+X4)/3.0;
cout<<Sol2<<"and"<<Sol2;
}
cin.get();cin.get();
return 0;
}
when i enter the values x1=4,x2=4,x3=4,x4=4 i get the answer 1and1 which doesn't seem right... Any one see where im going wrong....? Thanks