Created
April 10, 2015 02:36
-
-
Save samir96/7e181f8c3b51095a1ee2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <math.h> | |
using namespace std; | |
int main (){ | |
float arrayf[10],sum=0,average, sq=0, desv; | |
for (int i=0; i<10; i++) | |
{ | |
cout<<"Give a number "<<(i+1)<<" : "<<endl; | |
cin>>arrayf[i]; | |
} | |
for (int i=0; i<10; i++) | |
{ | |
sum+=arrayf[i]; | |
sq+=(arrayf[i])*(arrayf[i]); | |
} | |
average=sum/10; | |
desv=sqrt(sq/10); | |
cout<<"The suma of your your numbers: "<<sum<<endl; | |
cout<<"The average of tour numbers is: "<<average<<endl; | |
cout<<"The normal desviation is: "<<desv<<endl; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment