请问这个程序为什么不能显示最后一行数据
#include<stdio.h>struct student
{
char num[11],name[9];
int normal,exam,total;
};
void show(char *filename)
{
FILE *fp;
int total;
student x;
fp=fopen(filename,"r");
fscanf(fp,"%s%s%d%d",x.num,x.name,&(x.normal),&(x.exam));
while(!feof(fp))
{
total=(int)(x.normal*0.3+x.exam*0.7);
printf("%-12s%-10s%-4d%-4d%-4d\n",x.num,x.name,x.normal,x.exam,total);
fscanf(fp,"%s%s%d%d",x.num,x.name,&(x.normal),&(x.exam));
}
fclose(fp);
}
int main()
{
show("student.txt");
return 0;
}