那位帮我看下这个程序问题出在哪里啊
#include <stdio.h>#include <stdlib.h>
struct Student
{char name[20];
char reason[20];
float money;
}std,pers[20],*pstd;
int main()
{FILE *fp;
char ch;
int i,x;
struct Student student[100];
printf("number: ");
scanf("%d",&x);
for(i=0;i<x;i++)
{
printf("input student%d info\n",i+1);
printf("name reason money");
scanf("%s",&student[i].name);getchar();
scanf("%s",&student[i].reason);getchar();
scanf("%f",&student[i].money);}
if((fp=fopen("file1.dat","w"))==NULL)
{printf("Can't open this file1!\n");exit(0);}
ch=getchar();
while(ch!='@')
{fputc(ch,fp);ch=getchar();
}fclose(fp);}