Calculate the average results and using Dev C + +

#include <iostream.h>

int main()
{
int aray[100];
int n;
float average, the number of b=0;
cout<<” enter as much data as = “;
cin>>n;

for(int i=0;i<n;i++){
cout<<“enter a value[“<<i+1<<“] : “;
cin>>aray[i];

}
cout<<endl;

for(int i=0;i<n;i++){
cout<<“value[“<<i+1<<“] : “;
cout<<aray[i]<<endl;
the number of +=aray[i];
}
cout<<endl;

rata=the number of/n;
cout<<“amount of data is = “<<the number of<<endl;
cout<<“the mean is = “<<average;

return 0;
}

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s