为什么一直报错呢?哪里错了呀?
#include <stdio.h>
int decending(int score[])
{int i;
int j;
int sum=0;
for(i=9;i>0;i--)
{
for(j=0;j<9;j++)
{
if(score[j]>score[j+1])
{
int temp=score[j];
score[j]=score[j+1];
score[j+1]=temp;
}
}
}
printf("the decending order is\n");
for(i=0;i<10;i++)
{
printf("%d",score[i]);
sum=sum+score[i];
}
int aver=sum/10;
printf("\nthe lowest score is %d\n",score[0]);
printf("the highest score is %d\n",score[9]);
printf("the average score is %d\n",aver);
printf("the total score is %d\n", sum);
return 0;
}
int main()
{
int score[N]={67,98,75,63,82,79,81,91,66,84};
decending(score);
return 0;
}