C语言课程设计银行个人账户管理系统
printf("\n请输入储户身份证号,并用回车键确认: \n"); scanf("%s",dep.per);
fprintf(fp,"\n%s\n",dep.per);
printf("\n请输入储户密码,并用回车键确认: \n"); scanf("%f",&dep.sec);
fprintf(fp,"\n%f\n",dep.sec);
printf("\n请输入储户金额,并按回车键确认: \n"); scanf("%f",&dep.mon);
fprintf(fp,"\n%f\n",dep.mon); if(dep.mon<10 ) { printf("\n 储户金额低于十元,不予开户 \n"); return ; }
printf("\n **********************开户成功*************************\n"); fclose(fp); }
void show() //余额查询 { struct depositor dep[N]; int i,n ; char s[20]; float t ;
n=reads(dep); printf("\n请用户输入账号,密码,用空格隔开,按回车键确认:\n"); scanf("%s %f",s,&t); for(i=0;i<n;i++)
if (strcmp(s,dep[i].num)==0 && t==dep[i].sec) break; if (i>=n || t!=dep[i].sec) { printf("\n 输入错误 \n"); return ; } else { printf("*********************储户的余额如下**********************\n");