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 comment