请问我这个问题出在哪里?排序出来的数是乱的
int Descending(int score[])
{
int l,m,n;
for(l=9;l>0;l--)
{
for(m=0;m<l;m++)
{
if(score[m]<score[m+1])
n=score[m+1];
score[m+1]=score[m];
score[m]=n;
}
}
return 0;
}
int main()
{
int o;
int score[10]={67,98,75,63,82,79,81,91,66,84};
printf("Total score:%d\n",total(score));
printf("Maximum:%d\n",Maximum(score));
printf("minimum:%d\n",Minimum(score));
printf("Average:%d\n",Average(score));
printf("Descending:");
Descending(score);
for(o=0;o<10;o++)
{
printf("%d,",score[o]);
}
return 0;