#include <stdio.h>
main(){
float average(int);
int number[10];
float aver;
int i;
printf("请输入10个整数\n");
for(i=0;i<=10;i=i+1){
printf("第%d个数:",i+1);
scanf("%4d",number[i]);
}
aver=average(number[i]);
printf("平均值为%d\n",aver);
}
float average(int a[]){
int sum,i;
float aver;
for(i=0;i<=10;i=i+1)
sum=sum+a[i];
aver=sum/10.0;
return(aver);
}