请大家帮忙看看这个哪里有问题呀,为什么运行不了呢?
#include <stdio.h>
int setdown(int arr[],int length)
{
int i,j,temp;
for(i=0;i<length-1;i++)
{
for(j=0;j<length-1;j++)
{
if (arr[j]<arr[j+1])
{
temp=arr[j];
arr[j+1]=arr[j];
arr[j+1]=temp;
}
}
}
}
int main()
{
int N;
int score[N]={67,98,75,63,82,79,81,91,66,84};
int length=10;
int sum=0,a,max,min;
float aver;
int setdown(score,length);
for (a=0;a<length;a++)
{
printf("%d",score[a]);
sum+=score[a];
aver=sum/length;
max=score[a];
min=score[length-1];
}
printf("成绩降序是%d,平均分是%f,最高分是%d,最低分是%d,总分是%d\n",score[a],aver,max,min,sum);
return 0;
}