最后的输出出了问题:student[i].score>=student[sum]这里,你的数组下标是从0开始的,但sum是从1开始数的,所以得把student[sum]改成student[sum-1]。 by mengmeng123456 @ 2024-03-14 18:15:20