《C语言ATM程序模拟》由会员分享,可在线阅读,更多相关《C语言ATM程序模拟(18页珍藏版)》请在人人文库网上搜索。

1、一、 课题要求1、 当输入给定的卡号和密码(初始卡号和密码为123456)时,系统能登录ATM柜员机系统。2、 查询余额:初始余额为10000元。3、 ATM取款:每次取款金额为100的倍数,总额不超过5000元,支取金额不允许透支。4、 ATM存款:不能出现负存款。5、 修改密码:新密码长度不小于6位,不允许出现6位完全相同的情况,只有旧密码正确,新密码符合要求,且两次输入相同的情况下才可以成功修改密码。二、 代码#include stdafx.h#include stdio.h#include windows.h#include stdlib.h#include conio.hvoid g。

2、otoxy(int x,int y); /光标位置函数void enter_ATM(); /账号输入函数 void input_code(); /密码输入函数void caozuo(); /基本操作界面void qukuan(); /取款函数void success(); /操作成功函数void delay(); /延时函数void yu_e(); /余额查询函数void cunkuan(); /存款函数void panduan(long int z); /判断取款是否合法函数void exit(); /退出界面函数void mima(); /密码修改void zhuangyi();long 。

3、int CODE=123456,YU_E=10000;/=主函数=/main()enter_ATM();caozuo();/=/=柜台机账号输入函数=/void enter_ATM()system(cls);printf(*n);printf(* *n);printf(* 欢迎使用 ATM 柜台机 *n);printf(* 请输入卡号 *n);printf(* *n);printf(* 取消 确定 *n);printf(* *n);printf(*n);long int user;gotoxy(14,4);scanf(%d,&user);while(user!=123456) system(c。

4、ls);printf(*n);printf(* *n);printf(* 账户不存在,请从新输入 *n);printf(* *n);printf(* *n);printf(* 取消 确定 *n);printf(* *n);printf(*n);gotoxy(13,3);scanf(%d,&user);input_code();/=/=密码输入函数=/void input_code()long int code; int temp=3,time;system(cls);printf(*n);printf(* *n);printf(* 请输入密码 *n);printf(* *n);printf(*。

5、 *n);printf(* 取消 确定 *n);printf(* *n);printf(*n); gotoxy(14,3);scanf(%d,&code); while(code!=CODE)temp-;if(temp=0)for(time=5;time0;time-)system(cls);printf(*n);printf(* *n);printf(* 您已经 3 次输入密码 *n);printf(* 系统将退出操作 *n);printf(* *n);printf(* );printf(%d,time);printf( *n);printf(* *n);printf(*n);delay()。

6、;enter_ATM();system(cls);printf(*n);printf(* *n);printf(* 密码错误,请重新输入 *n);printf(* 您还有 );printf(%d,temp);printf( 次机会 *n);printf(* *n);printf(* 取消 确定 *n);printf(* *n);printf(*n);gotoxy(14,4);scanf(%d,&code);caozuo();/=/=主操作界面函数=/void caozuo()system(cls);printf(*n);printf(* 请选择一下业务 *n);printf(* 1.修改密码 。

7、*n);printf(* 2.查询余额 *n);printf(* 3.取款 *n);printf(* 4.实时存款 *n);printf(* 5.退出 *n);printf(*n);switch(getch()case 1: mima(); break;case 2: yu_e(); break;case 3: qukuan(); break;case 4: cunkuan(); break;case 5: exit(); break;default:printf(errorn);/=/=密码修改函数=/void mima()long int mm1,mm2,mm3;char temp;sys。

8、tem(cls);printf(*n);printf(* *n);printf(* 旧密码: *n);printf(* *n);printf(* 新密码: *n);printf(* 确认新密码: *n);printf(* *n);printf(*n);gotoxy(15,2);scanf(%d,&mm1);gotoxy(15,4);scanf(%d,&mm2);gotoxy(15,5);scanf(%d,&mm3);if(mm1!=CODE)system(cls);printf(*n);printf(* *n);printf(* 旧密码错误 *n);printf(* *n);printf(* 。

9、请重新输入! *n);printf(* *n);printf(* *n);printf(*n);delay();delay();zhuangyi();if(mm2!=mm3)system(cls);printf(*n);printf(* *n);printf(* 确认密码不一致 *n);printf(* *n);printf(* 请重新输入! *n);printf(* *n);printf(* *n);printf(*n);delay();delay();zhuangyi();if(mm2YU_E)system(cls);printf(*n);printf(* *n);printf(* 余额不。

10、足! *n);printf(* 请重新操作 *n);printf(* *n);printf(* 1.返回 2.退出 *n);printf(* *n);printf(*n);switch(getch()case 1: qukuan();case 2: exit();beishu=z%100;if(beishu!=0)system(cls);delay();printf(*n);printf(* *n);printf(* 本ATM机只支持 100 的人民币 *n);printf(* 请重新操作 *n);printf(* *n);printf(* 1.返回 2.退出 *n);printf(* *n)。

11、;printf(*n);switch(getch()case 1: qukuan();case 2: exit();if(z=5000|z5000)system(cls);printf(*n);printf(* *n);printf(* 每次取款不能超过 5000 元 *n);printf(* 请重新操作 *n);printf(* *n);printf(* 1.返回 2.退出 *n);printf(* *n);printf(*n);switch(getch()case 1: qukuan();case 2: exit();YU_E=YU_E-z;success();/=/=存款函数=/void。

12、 cunkuan()long int temp;system(cls);printf(*n);printf(* *n);printf(* 请放入人民币 *n);printf(* *n);printf(* 取消 确定 *n);printf(* *n);printf(* *n);printf(*n);gotoxy(14,3);scanf(%d,&temp);while(temp0;bl1-)for(bl2=410;bl20;bl2-);/=/=操作成功函数=/void success()system(cls);printf(*n);printf(* *n);printf(* *n);printf(。

13、* 系统正在处理 *n);printf(* 请稍候. *n);printf(* *n);printf(* *n);printf(*n);delay();delay();system(cls);printf(*n);printf(* *n);printf(* 操作已成功 *n);printf(* *n);printf(* 1.返回 2.退出 *n);printf(* *n);printf(* *n);printf(*n);switch(getch()case 1:caozuo(); break;case 2:exit(); break;/=/=系统退出函数=/void exit()system(cls);printf(*n);printf(* *n);printf(* *n);printf(* 欢迎您的再次使用 *n);printf(* 系统正在退出. *n);printf(* *n);printf(* *n);printf(*n);delay();delay();enter_ATM();/=/= 简单转移函数=/void zhuangyi()mima();/=/三、 部分效果截图18欢迎下载。

c语言模仿atm源代码,C语言ATM程序模拟相关推荐

  1. 连连看c语言源程序,连连看源代码C语言

    连连看源代码C语言Tag内容描述: 1.连连看游戏C语言源代码 include stdio h include graphics h include stdlib h include math h i ...

  2. c语言停车场管理系统源代码,C语言课程设计 停车场管理系统 源代码 原创 不得随意转载...

    大学生C语言课程设计的成果源代码 # include # include # include # include int k=0; /*牌照信息结构体*/ struct l { char pro[20 ...

  3. c语言超市账务管理源代码,C语言 超市管理系统源程序.doc

    C语言 超市管理系统源程序.doc C语言超市管理系统源程序 超市管理系统源程序代码,要可以执行的.最好是文件,链表中的一种.好了一定重金酬谢~ 最佳答案 有一个小型超市,出售N(N>=10)种 ...

  4. C语言成绩统计源代码,C语言课程设计学生成绩管理系统+源码

    <C语言课程设计学生成绩管理系统+源码>由会员分享,可在线阅读,更多相关<C语言课程设计学生成绩管理系统+源码(25页珍藏版)>请在人人文库网上搜索. 1.简易教学管理系统的设 ...

  5. c语言在线阅读源代码,C语言-源代码详细资料.doc

    \\ 剪刀石头布源代码 #include #include main() { int d,x; { printf("请输入:1是剪刀,2是石头,3是布"); scanf(" ...

  6. c 语言登录系统源代码,c语言源代码---------------个人图书管理系统

    该楼层疑似违规已被系统折叠 隐藏此楼查看此楼 printf( "\30\30\30\30\30\30\30\30\30\30\30\30\30\30\30\30\30\30\30\30\30 ...

  7. c语言局域网聊天源代码,局域网聊天的程序(C++版)

    该楼层疑似违规已被系统折叠 隐藏此楼查看此楼 //server #include #include #include #include #include #define PORT 100 #defin ...

  8. c语言万年历的源代码,C语言万年历的源程序

    该楼层疑似违规已被系统折叠 隐藏此楼查看此楼 for(j=1;j<=mon[i];j++) {cprintf("%3d ",j); /*if((first+j-1)%7==0 ...

  9. c语言scanf函数源代码,C语言之可变参实现scanf函数(示例代码)

    既然有printf函数可变参实现,那就一定有scanf函数的可变参实现.废话不多说,源码奉上: 本源码不过多分析,如要明白原理,请翻本博客以往的文章看说明. 欢迎关注新浪微博:http://weibo ...

最新文章

  1. SCRFD is not in the models registry
  2. 诗歌rails 之with_options
  3. html表单提交前验证,jquery表单提交前实现同步验证(附代码)
  4. 两天学会css基础(一)
  5. 计算机的原理两条分别是,微机原理习题答案4
  6. 20200119:(leetcode)回文数(3种解法)
  7. 51nod 1428 bzoj 1651: [Usaco2006 Feb]Stall Reservations 专用牛棚
  8. C#的解题思路(1):不重复随机数的产生问题
  9. mysql查询结果插入另外一张表
  10. mysql中count(*)、count(1)和count(字段)的区别
  11. IDEA之配置SVN
  12. CSR烧录工具csr单个蓝牙烧录小工具qcc300x烧录软件/CSR86xx烧写工具
  13. 【安装】安装OpenCV简易教程
  14. MUI框架-08-窗口管理-创建子页面
  15. bzoj4816 [Sdoi2017]数字表格(反演)
  16. 未找到beta版怎么解决_Chrome这设计硬伤实在太难用!用它完美解决
  17. hdu5745 La Vie en rose【dp+bitset优化】
  18. ncbi和ensembl上的序列下载
  19. 百度文字识别官方Demo
  20. java培优学习笔记(一)多线程快速入门

热门文章

  1. 如何优雅地打印一个Java对象?
  2. SQL SERVER IO request 超时
  3. 【python】RuntimeError: Set changed size during iteration 问题解决
  4. excel单元格斜线_制作excel双斜线表头的新方法,完美解决拖动变形的问题
  5. [leetcode]Unique Paths II
  6. 20.EC实战 笔记本电脑的休眠唤醒是如何实现的
  7. NX二次开发 UFUN创建倒角特征 UF_MODL_create_chamfer
  8. python 小说人物分析_用Python来看金庸先生的小说,这一生向大侠致敬
  9. Qt 配置自动清理中间文件 --- qmake
  10. mac下的android模拟器吗,Mac怎么安装Andriod模拟器 Mac怎么安装安卓模拟器