/* *Copyright(c) 2015/6/3 CSDN博客 *All rights reserved. *文件名:main.c *作 者:金叶 *完毕日期:2015/6/3 *版本:V1.0 *问题描写叙述:小型银行应用程序 *程序输出: */ #include <stdio.h> #include <string.h> #include <stdlib.h> #include <ctype.h> #include <conio.h> #define upNum 2000 int ipass(); //银行员工password确认 void downdate(); //载入数据 int iChoose(); //银行员工选择功能 int search(int id); //用于查找账户相应的下标 int inputpass(); //用于输入password void work(); //主菜单 void open_account(); //1开户 void cancellation(); //2注销 void deposit(); //3存款 void withdraw_money(); //4取款 void query(); //5查询 void transfer_accounts(); //6转账 void loss(); //7挂失 void unloss(); //8解挂 void change(); //9该密 void update(); //保存数据,退出 int user[upNum][3]; //账号、password、状态 char name[upNum][10]; //username double balance[upNum]; //账户剩余金额 int N; //银行用户实际人数 int main() { if (ipass()==1) { downdate(); work(); update(); } return 0; } int ipass() { int i,j=3; int right=0; char ch; char worker[20]; char ipass[20]; char worker1[20]; char ipass1[20]; FILE *fp; printf("+-------------------+ "); printf("+ 欢迎光临CSDN银行 + "); printf("+-------------------+ "); if ((fp=fopen("worker.txt","r"))==NULL) { printf("worker file cannot open!"); exit(0); } fscanf(fp,"%s %s",worker,ipass); //读入工作人员username fclose(fp); do { printf("请输入业务员的username:"); scanf("%s",worker1); printf("请输入password:"); i=0; while((ch=getch())!=' ') { ipass1[i++]=ch; putchar('*'); } ipass1[i]='