为啥程序没问题编程的结果有错误求大神指点?
#include<stdio.h>int averge(int achievement)
{
int averge_achievement;
averge_achievement=achievement/10;
printf("10个同学的平均数为:\n");
printf("%d",averge_achievement);
return averge_achievement;
}
int main()
{
int i,achievement,a[10];
printf("请输入10个学生的成绩:\n");
for(i=0;i<10;i++)
{
scanf("%d",&a[i]);
}
for(i=0;i<10;i++)
{
achievement=achievement+a[i];
}
averge(achievement);
}