#include <iostream>
int main()
{
int i,n,m;
cout <<"Enter the total numbers \n";
cin >>n;
cout <<"The total number of array is \n"<<n;
for(i=1;i<=n;i++)
cin >>a[i];
m=0;
cout <<"The entered array is \n";
for(i=1;i<=n;i++)
cout <<"\n"<<a[i];
for(i=1;i<=n;i++)
m = m + a[i];
m = m / n;
cout <<" The average of 'n' numbers is \n"<< m;
return 0;
}
can you explain the codes please, the use of the variables.
ReplyDelete