![](https://i-blog.csdnimg.cn/blog_migrate/97aba69b7eb8c9e21035a4b2c9561b8b.png)
c'++查找特定的值
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr(); //to clear the screen
int i,n,x,sum=0;
cout<<“How many numbers?”;
cin>>n;
for(i=1;i<=n;++i)
{
cout<<“nEnter number “<<i<<“: “;
cin>>x;
sum+=x;
}
x=sum/n;
cout<<“nnAverage=”<<x;
getch(); //to stop the screen
}
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr(); //to clear the screen
int i,n,x,sum=0;
cout<<“How many numbers?”;
cin>>n;
for(i=1;i<=n;++i)
{
cout<<“nEnter number “<<i<<“: “;
cin>>x;
sum+=x;
}
x=sum/n;
cout<<“nnAverage=”<<x;
getch(); //to stop the screen
}
翻译自: https://www.thecrazyprogrammer.com/2012/07/c-program-to-find-average-of-list-of.html
c'++查找特定的值