一个管理系统,为什么会出现这样的情况
void rank2(int n,int m)
{
int i,j,g;
student saver;
printf("%16s%16s%16s","number","name","sum");
for(g=0;g<=m-1;g++)
printf("%15s%1d","subject",g+1);
printf("\n");
for(i=0;i<=n-1;i++)
{
for(j=i+1;j<=n-1;j++)
{
if(a[i].number>=a[j].number)
saver=a[i];
a[i]=a[j];
a[j]=saver;
}
printf("%16d%16s%16f",a[i].number,a[i].name,a[i].sgrade);
for(g=0;g<=m-1;g++)
printf("%16.2f",a[i].grade[g]);
printf("\n");
}