降序 有麻烦了
int dec_score(int dec[])
{
int i,j,temp;
for(j = 0;j < 9;j++)
{
for(i = 0;i < 10 - j - 1;i++)
{
if(dec[i + 1] > dec[i])
{
temp = dec[i + 1];
dec[i + 1] = dec[i];
dec[i] = temp;
}
printf("成绩排名:%d\n",dec[i]);
}
return dec[i];
}
}
int main()
{
int score[]={67,98,75,63,82,79,81,91,66,84};
total_score(score);
ave_score(score);
high_score(score);
dec_score(score);
return 0;
}