//Ex4_2.cpp
#include "iostream" 
#include "cstdlib"
#include "ctime"
using namespace std;
void main() 
{ int f[10],i,count=0,max,row;
 float aver=0;
 srand(time(NULL));
 for(i=0;i<10;i++)  //产生10个数
	{f[i]=rand()%101; aver+=f[i];}
 aver/=10;
 max=f[0]; row=0;
 for(i=0;i<10;i++)  //输出10个数，统计并找最大数
	{if (f[i]>aver) count++;
	 if (f[i]>max) {max=f[i];row=i;}
	 cout<<f[i]<<"   ";}
 cout<<"\n大于平均数("<<aver<<")的个数:"<<count;
 cout<<",max="<<max<<",row="<<row+1<<endl;
}
