电气实训报告 ATM.doc_第1页
电气实训报告 ATM.doc_第2页
电气实训报告 ATM.doc_第3页
已阅读5页,还剩2页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

本文档系作者精心整理编辑,实用价值高。流程图:开始选择语言功能存款取款查询信息结束功能存款取款查询信息E中/*设定账号:12345678 密码:123456*/#include#includeint qukuan1()/取款函数 system(cls);float c; while(printf(输入0退出。n请输入整百数!n请输入取款金额:)/循环输入,多次操作scanf(%f,&c); if(int)c%100=0&c=100)/对取款金额的限定switch(int)c) case 0:exit(0);break; default :printf(欢迎下次使用!n); else printf(输入错误!n);return 0;int cunkuan1()/存款函数system(cls);/清屏 int d;printf(输入0退出。n请将存款放入:n);printf(欢迎下次使用n!);scanf(%d,&d);switch(d)case 0:exit(0);break;default :; return 0;int xinxi1()/信息函数system(cls);int e; FILE *fp;char ch; fp=fopen(xinxi.txt,r);/文件调用if(fp=NULL)printf(errorn);elsewhile(ch=fgetc(fp)!=EOF)putchar(ch);fclose(fp); printf(n欢迎下次使用!n); scanf(%d,&e);switch(e)case 0:exit(0);break;default :; return 0;int chinese()/中文选择函数 system(cls);int zhanghao,mima,a,i,j;i=1;printf(请输入账号:);while(i4)/账号的3次输入+i;scanf(%d,&zhanghao);if(zhanghao=12345678)printf(请输入密码:); j=1;while(j=100) switch(int)f) case 0:exit(0);break; default :printf(Welcome to the next using!n);elseprintf(Input errors!n); return 0;int cunkuan2()system(cls); int g; printf(Enter 0 to exitn);printf(Please deposit into the ATM:n);printf(Welcome to the next using!n); scanf(%d,&g);switch(g) case 0:exit(0);break; default :; return 0;int xinxi2()system(cls);int h;printf(Enter 0 to exitn); FILE *fp;char ch; fp=fopen(xinxi.txt,r);if(fp=NULL)printf(errorn);elsewhile(ch=fgetc(fp)!=EOF)putchar(ch);fclose(fp);printf(nWelcome to the next using!n); scanf(%d,&h);switch(h) case 0:exit(0);break; default :; return 0;int english()system(cls);int zhanghao,mima,b,k,l;printf(Please enter the account:);while(k4)+k;scanf(%d,&zhanghao);if(zhanghao=12345678)printf(Please enter your password:);while(l4)+l;scanf(%d,&mima);if(mima=123456)system(cls);printf(The machine features is:nWithdrawals-1nDeposit-2nAccount Information-3nEexit-0nPlease select:); scanf(%d,&b); switch(b) case 1:qukuan2();break; case 2:cunkuan2();break; case 3:xinxi2();break; case 0:exit(0); else printf(Password error!n); switch(l) case 4:exit(0);break; default :printf(Please re-enter password:);break; elseprintf(Account error!n); switch(k)case 4:exit(0);break;default :printf(Please re-enter account:);break;return 0;main()/主函数int language;printf( #欢迎使用中国建设银行自动存取款机#n);printf(#Welcome to China Construction Bank Automatic Teller Machine#n);printf(中文-1nEnglish-2n退出exit-0n请选择:);while(scanf(%d,

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论