帮忙看下这个程序!回事呢?、
#define N 100#include "stdio.h"
struct Student
{char name[20];
char reason[20];
float money;
}st[N];
main()
{FILE *fp;
char ch;
int i;
float f;
if((fp=fopen("file1.rec","wb"))==NULL)
{printf("\n文件file1.rec打不开!\n");
exit(0);
}
i=0;
do
{printf("请输入班费信息:姓名,原因,金额");
scanf("%s%s%f",st[i].name,st[i].reason,&f);
st[i].money=f;
fwrite(&st[i],sizeof(struct Student),1,fp);
i++;
printf("\n 继续输入学生信息(y/n)?");
ch=getchar();}
while(ch=='y'||ch=='Y');
fclose(fp);}
为什么从这里开始就没用了printf("\n 继续输入学生信息(y/n)?");
ch=getchar();}
while(ch=='y'||ch=='Y');
fclose(fp);}