为什么这里的语句需要用到for嵌套?
#include <stdio.h>
void sortScore(int score[])
{
int i,j,temp;
for(i=0;i<=8;i++)
{
for(j=0;j<=8;j++)
{
if(score[j]>score[j + 1])
{
temp = score[j];
score[j] = score[j + 1];
score[j + 1] = temp;
}
}
}
}
int main()
{
int i;
int score[10]={67,98,75,63,82,79,81,91,66,84};
sortScore(score);
for(i=0;i<=9;i++)
{
printf("%d ",score[i]);
}
return 0;
}