C语言课程设计银行个人账户管理系统
printf("\n ************************* 银行个人账户管理系统*************************** ");
printf("\n 1 储户开户"); printf("\n 2 余额查询"); printf("\n 3 储户销户"); printf("\n 4 密码修改"); printf("\n 5 退出"); printf("\n
************************************************************************** ");
printf("\n %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% "); }
int reads(struct depositor dep[N]) // 读取储户内容 { FILE *fp; int i=0;
if((fp=fopen("account.dat","r"))==NULL) { printf("文件打开失败!\n"); return 0; } else {
for(i=0;!feof(fp);i++)
fscanf(fp,"\n%s %s %s %f %f\n",dep[i].num,dep[i].name,dep[i].per,&dep[i].sec,&dep[i].mon); }
fclose(fp); return i; }
void save(struct depositor dep[N],int n) // 储户保存后信息 { FILE *fp;