一、目标:

ATM仿真软件

1 系统的基本功能

ATM的管理系统其基本功能如下:密码验证机制;吞锁卡机制;存取款功能;账户查询功能;转账功能等。

要求

要能提供以下几个基本功能:

(1)系统内的相关信息文件由程序设计人员预先从键盘上录入,文件中的数据记录不得少于20条;

(2)设计并实现系统的相关界面,使用分级菜单提高人机交互性;

(3)登录系统必须输入正确的卡号和密码,输入错误时提示用户,连续输入错误3次则显示锁卡,用户登录后可以修改自己的密码;

(4)取款功能:输入取款金额,核对。若超出账户余额,则输出“余额不足”则,输出对应金额的现金,并提示用户是否打印回单,退卡,返回界面;

(5)存款功能:存入现金,核对金额,存入账户,提示用户是否打印回单,返回主界面;

(6)查询账户信息,包括用户名、余额信息,以及各种操作的历史记录;

(7)转账模块,提示用户输入正确的账号,检查转账条件是否满足,并完成转账操作;

(8)退出终端系统,提示用户保存好银行卡。

在查询界面中提供以下功能:利用账户的历史余额数据,进行账户余额的预测分析。

提示

(1)用户的卡号和密码必须以密文形式保存在文件中,所以在验证账号信息的过程中必须包含加密和解密的过程。

(1)ATM仿真系统功能框图如下:

图1 ATM仿真软件功能框图

(2)结构体

根据用户信息,设计每个用户的结构体如下:

struct Account{                                                                                          //账号信息

char ID[20];                                          //卡号

char name[20];                                                                               //姓名

int password[6];                                         //密码

double money;                                        //账户余额

}

struct Statement{                                           //单笔流水信息

char ID[20];                                                                                     //编号

char accountID[20];                                                                        //对应账号

char time[20];                                                                               //交易时间

int type;                                                                                            //交易类型

double money;                                                                                 //交易数额

char toAccunt[20];                                                                          //对方账号

}

2.4 其他要求

(1)在上述功能要求的基础上,为了提高成绩,可以添加一些额外的功能。

(2)变量、方法命名符合规范。

(3)注释详细:每个变量都要求有注释说明用途;方法有注释说明功能,对参数、返回值也要以注释的形式说明用途;关键的语句段要求有注释解释。

(4)程序的层次清晰,可读性强。

二、程序内部用到的小知识

1、原型:char *itoa( int value, char *string,int radix);

这个函数是一个c语言中将数字转化成字符串的函数。第一个参数value 是你要转换的数字,第二个参数string 是转换成字符串后放在那个数组里面,第三个参数radix是转换后的进制数(10进制、16进制等等)

itoa 并不是一个标准的C函数,它是Windows特有的,如果要写跨平台的程序,请用sprintf。标准库中有sprintf,功能比这个更强

示例代码:(原本我使用的springtf,以为它是c++的函数,所以就换了,没想到这个函数在c环境中也可以使用!!)

 1 #include<stdio.h>
2 int main()
3 {
4 char str[10];
5 int a=1234321;
6 //将整数转化为字符串
7 sprintf(str,"%d",a);
8 int len=strlen(str);
9 printf("%s %d",str,a);
10 }

2、将字符串转化成数字sscanf函数

 1 #include<stdio.h>
2 int main()
3 {
4 char str[]="1234321";
5 int a;
6 sscanf(str,"%d",&a);
7 printf("%d\n",a);
8 char str1[]="123.321";
9 double b;
10 sscanf(str1,"%lf",&b);
11 printf("%lf\n",b);
12 return 0;
13 }

3、

C语言 strcpy() 函数用于对字符串进行复制(拷贝)。
头文件:string.h
语法/原型:
char* strcpy(char* strDestination, const char* strSource);
参数说明:
strDestination:目的字符串。
strSource:源字符串。
strcpy() 会把 strSource 指向的字符串复制到 strDestination。
必须保证 strDestination 足够大,能够容纳下 strSource,否则会导致溢出错误。
返回值:目的字符串,也即 strDestination。
 
还有一个和它很像的函数叫strcpy(s1,s2),它是让两个字符串比较。所在头文件也是#include<string.h>
当s1<s2时,返回为负数 注意不是-1
当s1==s2时,返回值= 0
当s1>s2时,返回正数 注意不是1
即:两个字符串自左向右逐个字符相比(按ASCII值大小相比较),直到出现不同的字符或遇'\0'为止。如:
 
4、获取当前时间的函数
 
struct tm的结构为
  int tm_sec;       /* 秒 – 取值区间为[0,59] */
  int tm_min;       /* 分 - 取值区间为[0,59] */
  int tm_hour;      /* 时 - 取值区间为[0,23] */
  int tm_mday;      /* 一个月中的日期 - 取值区间为[1,31] */
  int tm_mon;       /* 月份(从一月开始,0代表一月) - 取值区间为[0,11] */
  int tm_year;      /* 年份,其值等于实际年份减去1900 */
  int tm_wday;      /* 星期 – 取值区间为[0,6],其中0代表星期天,1代表星期一,以此类推 */
  int tm_yday;      /* 从每年的1月1日开始的天数 – 取值区间为[0,365],其中0代表1月1日,1代表1月2日,以此类推 */
  int tm_isdst;     /* 夏令时标识符,实行夏令时的时候,tm_isdst为正。不实行夏令时的进候,tm_isdst为0;不了解情况时,tm_isdst()为负。*/
  time_t 这种类型就是用来存储从1970年到现在经过了多少秒,要想更精确一点,可以用结构struct timeval,它精确到微秒。
 
 1 #include<stdio.h>
2 #include<time.h>
3 int main()
4 {
5 struct tm *local;
6 time_t t;
7 t=time(NULL);
8 local=localtime(&t);
9 printf("%d %d %d\n",local->tm_year+1900,local->tm_mon+1,local->tm_mday);
10 return 0;
11 }

三、程序代码:

c版:

  1 //程序刚开始个人信息保存在account.txt文件内。文件内密码是加密密码,三位加密密码对应一位
2 //真实密码
3 //222333,前三位对应真实密码2后三位对应真实密码3.所以正确密码位23
4 //account.txt文件初始已有20条数据
5 #include<stdio.h>
6 #include<string.h>
7 #include<stdlib.h>
8 #include<windows.h>
9 #include<time.h>
10 #define maxn 10005
11 #define INF 0x3f3f3f3f
12 #define Key 111
13 typedef struct //账号信息
14 {
15 char ID[20]; //卡号
16 char name[20]; //姓名
17 int password; //密码
18 double money; //账户余额
19 double origin_money;
20 } Account;
21 Account m[maxn];
22 typedef struct //单笔流水信息
23 {
24 char ID[20]; //编号
25 char accountID[20]; //对应账号
26 int year,yue,r; //交易时间
27 int type; //1为收钱,2为扣钱 //交易类型
28 double money; //交易数额
29 char toAccunt[20]; //对方账号
30 } Statement;
31 Statement w[maxn];
32 int number,now,start;
33 void init()
34 {
35 now=-1;
36 char password[25],ans;
37 number=0;
38 FILE *fp=NULL;
39 fp=fopen("account.txt","r");
40 char ch;
41 while(1)
42 {
43 if(feof(fp)) break;
44 fscanf(fp,"%s%s%s%lf%lf",m[number].ID,m[number].name,password,&m[number].money,&m[number].origin_money);
45 int len=strlen(password);
46 ans=0;
47 int sum=0,i,j;
48 for(j=0,i=0; i<len; ++i,++j,j%=3)
49 {
50 sum*=10;
51 sum+=password[i]-'0';
52 if(j==2)
53 {
54 ans=ans*10+sum/Key;
55 sum=0;
56 }
57 }
58 m[number].password=ans;
59 number++;
60 }
61 fclose(fp);
62 number--;
63 start=0;
64 fp=NULL;
65 fp=fopen("message.txt","r");
66 while(1)
67 {
68 if(feof(fp)) break;
69 fscanf(fp,"%s%d%d%d%d%lf%s",w[start].accountID,&w[start].year,&w[start].yue,&w[start].r,&w[start].type,&w[start].money,w[start].toAccunt);
70 start++;
71 }
72 fclose(fp);
73 start--;
74 }
75 void Login()
76 {
77 system("cls");
78 char id[20];
79 int flag=0;
80 int ans;
81 system("cls");
82 printf("请输入用户名:");
83 scanf("%s",id);
84 int i;
85 for(i=0; i<number; ++i)
86 {
87 if(strcmp(m[i].ID,id)==0)
88 {
89 now=i;
90 flag=1;
91 break;
92 }
93 }
94 if(flag)
95 {
96 printf("请输入密码\n");
97 scanf("%d",&ans);
98 if(m[now].password==ans)
99 {
100 printf("登陆成功\n");
101 }
102 else now=-1,printf("密码错误\n");
103 }
104 else
105 {
106 printf("用户名错误\n");
107 }
108 system("pause");
109 }
110 void Get_money()
111 {
112 system("cls");
113 double ans;
114 printf("输入你的取钱金额\n");
115 scanf("%lf",&ans);
116 if(m[now].money>=ans)
117 {
118 m[now].money-=ans;
119 printf("取钱成功\n");
120 system("cls");
121 printf ("--------丨 丨---\n");
122 printf ("--------丨 丨---\n");
123 printf ("--------丨 账户%s 丨---\n",m[now].ID);
124 printf ("--------丨 成功取得金额%lf 丨---\n",ans);
125 printf ("--------丨 请注意拿取现金 丨---\n");
126 printf ("--------丨 丨---\n");
127 printf ("--------丨 丨---\n");
128 }
129 else printf("余额不足\n");
130 system("pause");
131 }
132 void Save_money()
133 {
134 system("cls");
135 double ans;
136 printf("输入你的存钱金额\n");
137 scanf("%lf",&ans);
138 m[now].money+=ans;
139 printf("存储成功\n");
140 system("pause");
141 }
142 void Find_money()
143 {
144 system("cls");
145 printf("账号id:姓名: 余额: \n");
146 printf("%s %s %lf\n",m[now].ID,m[now].name,m[now].money);
147 system("pause");
148 }
149 void Find_message()
150 {
151 system("cls");
152 printf("自己账号:对方账号:类型(1为收钱,2为扣钱): 数额: 时间(年、月、日):\n");
153 int i;
154 for(i=0; i<start; ++i)
155 {
156 if(strcmp(w[i].accountID,m[now].ID)==0)
157 {
158 printf("%s %d %d %d %d %lf %s\n",w[i].accountID,w[i].year,w[i].yue,w[i].r,w[i].type,w[i].money,w[i].toAccunt);
159 }
160 }
161 system("pause");
162 }
163 void Modify_password()
164 {
165 int x,y;
166 system("cls");
167 printf("输入老密码\n");
168 scanf("%d",&x);
169 system("cls");
170 if(x==m[now].password)
171 {
172 printf("你确认要修改密码:\n");
173 printf("确认输入1,否则输入0\n");
174 scanf("%d",&x);
175 if(x)
176 {
177 printf("输入新密码\n");
178 scanf("%d",&x);
179 m[now].password=x;
180 printf("修改密码成功\n");
181 }
182 }
183 else
184 {
185 printf("密码错误\n");
186 }
187 system("pause");
188 }
189 void Conversion()
190 {
191 char id[20];
192 system("cls");
193 printf("输入你要转入得账户id:\n");
194 scanf("%s",id);
195 int i;
196 for(i=0; i<number; ++i)
197 {
198 if(strcmp(m[i].ID,id)==0)
199 {
200 int ans=0;
201 printf("确认要进行转账:");
202 printf("输入1继续进行,输入0终止操作:\n");
203 scanf("%d",&ans);
204 if(ans)
205 {
206 struct tm *local;
207 time_t t;
208 t=time(NULL);
209 local=localtime(&t);
210
211 double sum;
212 printf("输入转账金额\n");
213 scanf("%lf",&sum);
214 m[i].money+=sum;
215 strcpy(w[start].accountID,m[now].ID);
216 strcpy(w[start].toAccunt,m[i].ID);
217 w[start].money=sum;
218 w[start].type=2;
219 w[start].year=local->tm_year+1900;
220 w[start].yue=local->tm_mon;
221 w[start++].r=local->tm_mday;
222
223 strcpy(w[start].accountID,m[i].ID);
224 strcpy(w[start].toAccunt,m[now].ID);
225 w[start].money=sum;
226 w[start].type=1;
227 w[start].year=local->tm_year+1900;
228 w[start].yue=local->tm_mon;
229 w[start++].r=local->tm_mday;
230 m[now].money-=sum;
231 break;
232 }
233 else break;
234 }
235 }
236 system("pause");
237 }
238 void Quit()
239 {
240 FILE *fp=NULL;
241 fp=fopen("message.txt","w");
242 int i,j;
243 for(i=0; i<start; ++i)
244 {
245 fprintf(fp,"%s %d %d %d %d %lf %s\n",w[i].accountID,w[i].year,w[i].yue,w[i].r,w[i].type,w[i].money,w[i].toAccunt);
246 }
247 fclose(fp);
248
249 char str[25];
250 fp=NULL;
251 fp=fopen("account.txt","w");
252 for(i=0; i<number; ++i)
253 {
254 itoa(m[i].password, str, 10);
255 //sprintf(str,"%d",m[i].password);
256 int len=strlen(str);
257 fprintf(fp,"%s %s ",m[i].ID,m[i].name);
258 for(j=0; j<len; ++j)
259 {
260 int ans=str[j]-'0';
261 ans*=Key;
262 if(j!=len-1)
263 fprintf(fp,"%d",ans);
264 else fprintf(fp,"%d ",ans);
265 }
266 fprintf(fp,"%lf %lf\n",m[i].money,m[i].origin_money);
267 }
268 fclose(fp);
269 }
270 void Menu()
271 {
272 int x;
273 while(1)
274 {
275 system("cls");
276 printf ( " \n");
277 printf ( " \n");
278 printf ( " \n");
279 printf ("-------------------------------------- \n");
280 printf ("--------------------------------------\n");
281 printf ("--------丨[0]查看自己信息 丨---\n");
282 printf ("--------丨[1]查看自己交易信息 丨---\n");
283 printf ("--------丨[2]转账 丨---\n");
284 printf ("--------丨[3]存钱 丨---\n");
285 printf ("--------丨[4]取钱 丨---\n");
286 printf ("--------丨[5]修改密码 丨---\n");
287 printf ("--------丨[6]余额分析 丨---\n");
288 printf ("--------丨[7]结束 丨---\n");
289 printf ("----------输入相应数字----------------\n");
290 printf ("--------------------------------------- \n");
291 printf ( " \n");
292 printf ( " \n");
293 scanf("%d",&x);
294 if(x==0)
295 {
296 Find_money();
297 }
298 else if(x==1)
299 {
300 Find_message();
301 }
302 else if(x==2)
303 {
304 Conversion();
305 }
306 else if(x==3)
307 {
308 Save_money();
309 }
310 else if(x==4)
311 {
312 Get_money();
313 }
314 else if(x==5)
315 {
316 Modify_password();
317 }
318 else if(x==6)
319 {
320 int y;
321 system("cls");
322 printf ("--------------------------------------------------\n");
323 printf ("--------丨 丨---\n");
324 printf ("--------丨 你原有余额%lf 丨---\n",m[now].origin_money);
325 printf ("--------丨 丨---\n");
326 printf ("--------丨 先已有余额%lf 丨---\n",m[now].money);
327 if(m[now].origin_money>m[now].money)
328 printf ("--------丨 你的余额减少了%lf 丨---\n",m[now].origin_money-m[now].money);
329 else
330 printf ("--------丨 你的余额增加了%lf 丨---\n",m[now].money-m[now].origin_money);
331 printf ("--------丨 丨---\n");
332 printf ("--------丨 想要设置原有余额请输入1,否则输入0 丨---\n");
333 printf ("--------------------------------------------------\n");
334 scanf("%d",&y);
335 if(y==1)
336 {
337 printf("\n\n原有余额设置是以你现在的余额为原有余额,你是否确认设置\n");
338 printf("确认输出1,否则输出0\n");
339 scanf("%d",&y);
340 if(y) m[now].origin_money=m[now].money;
341 }
342 system("pause");
343 }
344 else if(x==7)
345 {
346 system("cls");
347 printf ("-------------------------------------- \n");
348 printf ("--------------------------------------\n");
349 printf ("--------丨 丨---\n");
350 printf ("--------丨 谢谢你的使用 丨---\n");
351 printf ("--------丨 丨---\n");
352 printf ("--------丨 请保存好银行卡 丨---\n");
353 printf ("--------丨 丨---\n");
354 printf ("--------丨 丨---\n");
355 printf ("--------------------------------------- \n");
356 Quit();
357 return;
358 }
359 }
360 }
361 int main()
362 {
363 printf ("-------------------------------------- \n");
364 printf ("--------------------------------------\n");
365 printf ("--------丨 丨---\n");
366 printf ("--------丨 丨---\n");
367 printf ("--------丨 丨---\n");
368 printf ("--------丨 欢迎使用ATM机 丨---\n");
369 printf ("--------丨 丨---\n");
370 printf ("--------丨 丨---\n");
371 printf ("--------------------------------------- \n");
372 system("pause");
373 int t=0;
374 init();
375 while(1)
376 {
377 t++;
378 Login();
379 if(now>=0)
380 {
381 break;
382 }
383 if(t==3 && now<0)
384 {
385 printf("密码多次错误,为了保护你的安全。你的卡已被吞取!\n");
386 return 0;
387 }
388 }
389 Menu();
390 return 0;
391 }

c++版:

  1 //程序刚开始个人信息保存在account.txt文件内。文件内密码是加密密码,三位加密密码对应一位
2 //真实密码
3 //222333,前三位对应真实密码2后三位对应真实密码3.所以正确密码位23
4 #include<stdio.h>
5 #include<string.h>
6 #include<iostream>
7 #include<algorithm>
8 #include<fstream>
9 #include<windows.h>
10 #include<time.h>
11 #include<string>
12 using namespace std;
13 const int maxn=10005;
14 const int INF=0x3f3f3f3f;
15 const int Key=111;
16 struct Account //账号信息
17 {
18 char ID[20]; //卡号
19 char name[20]; //姓名
20 int password; //密码
21 double money; //账户余额
22 } m[maxn];
23 struct Statement //单笔流水信息
24 {
25 char ID[20]; //编号
26 char accountID[20]; //对应账号
27 int year,yue,r; //交易时间
28 int type; //1为收钱,2为扣钱 //交易类型
29 double money; //交易数额
30 char toAccunt[20]; //对方账号
31 } w[maxn];
32 int number,now,start;
33 void init()
34 {
35 now=-1;
36 char password[25],ans;
37 number=0;
38 FILE *fp=NULL;
39 fp=fopen("account.txt","r");
40 char ch;
41 while(1)
42 {
43 if(feof(fp)) break;
44 fscanf(fp,"%s%s%s%lf",m[number].ID,m[number].name,password,&m[number].money);
45 int len=strlen(password);
46 ans=0;
47 int sum=0;
48 for(int j=0,i=0; i<len; ++i,++j,j%=3)
49 {
50 sum*=10;
51 sum+=password[i]-'0';
52 if(j==2)
53 {
54 ans=ans*10+sum/Key;
55 sum=0;
56 }
57 }
58 m[number].password=ans;
59 number++;
60 }
61 fclose(fp);
62 number--;
63 start=0;
64 fp=NULL;
65 fp=fopen("message.txt","r");
66 while(1)
67 {
68 if(feof(fp)) break;
69 fscanf(fp,"%s%d%d%d%d%lf%s",w[start].accountID,&w[start].year,&w[start].yue,&w[start].r,&w[start].type,&w[start].money,w[start].toAccunt);
70 start++;
71 }
72 fclose(fp);
73 start--;
74 }
75 void Login()
76 {
77 system("cls");
78 char id[20],flag=0,password,ans;
79 system("cls");
80 printf("请输入用户名:");
81 scanf("%s",id);
82 for(int i=0; i<number; ++i)
83 {
84 if(strcmp(m[i].ID,id)==0)
85 {
86 now=i;
87 flag=1;
88 password=m[i].password;
89 break;
90 }
91 }
92 if(flag)
93 {
94 printf("请输入密码\n");
95 scanf("%d",&ans);
96 if(password==ans)
97 {
98 printf("登陆成功\n");
99 }
100 }
101 else
102 {
103 printf("用户名错误\n");
104 }
105 system("pause");
106 }
107 void Get_money()
108 {
109 system("cls");
110 double ans;
111 printf("输入你的取钱金额\n");
112 scanf("%lf",&ans);
113 if(m[now].money>=ans)
114 {
115 m[now].money-=ans;
116 printf("取钱成功\n");
117 }
118 else printf("余额不足\n");
119 system("pause");
120 }
121 void Save_money()
122 {
123 system("cls");
124 double ans;
125 printf("输入你的存钱金额\n");
126 scanf("%lf",&ans);
127 m[now].money+=ans;
128 printf("存储成功\n");
129 system("pause");
130 }
131 void Find_money()
132 {
133 system("cls");
134 printf("账号id:姓名: 余额: \n");
135 printf("%s %s %lf\n",m[now].ID,m[now].name,m[now].money);
136 system("pause");
137 }
138 void Find_message()
139 {
140 system("cls");
141 printf("自己账号:对方账号:类型(1为收钱,2为扣钱): 数额: 时间(年、月、日):\n");
142 for(int i=0; i<start; ++i)
143 {
144 if(strcmp(w[i].accountID,m[now].ID)==0)
145 {
146 printf("%s %d %d %d %d %lf %s\n",w[i].accountID,w[i].year,w[i].yue,w[i].r,w[i].type,w[i].money,w[i].toAccunt);
147 }
148 }
149 system("pause");
150 }
151 void Conversion()
152 {
153 char id[20];
154 system("cls");
155 printf("输入你要转入得账户id:\n");
156 scanf("%s",id);
157 for(int i=0; i<number; ++i)
158 {
159 if(strcmp(m[i].ID,id)==0)
160 {
161 int ans=0;
162 printf("确认要进行转账:");
163 printf("输入1继续进行,输入0终止操作:\n");
164 scanf("%d",&ans);
165 if(ans)
166 {
167 struct tm *local;
168 time_t t;
169 t=time(NULL);
170 local=localtime(&t);
171
172 double sum;
173 printf("输入转账金额\n");
174 scanf("%lf",&sum);
175 m[i].money+=sum;
176 strcpy(w[start].accountID,m[now].ID);
177 strcpy(w[start].toAccunt,m[i].ID);
178 w[start].money=sum;
179 w[start].type=2;
180 w[start].year=local->tm_year+1900;
181 w[start].yue=local->tm_mon;
182 w[start++].r=local->tm_mday;
183
184 strcpy(w[start].accountID,m[i].ID);
185 strcpy(w[start].toAccunt,m[now].ID);
186 w[start].money=sum;
187 w[start].type=1;
188 w[start].year=local->tm_year+1900;
189 w[start].yue=local->tm_mon;
190 w[start++].r=local->tm_mday;
191 m[now].money-=sum;
192 break;
193 }
194 else break;
195 }
196 }
197 system("pause");
198 }
199 void Quit()
200 {
201 FILE *fp=NULL;
202 fp=fopen("message.txt","w");
203 for(int i=0; i<start; ++i)
204 {
205 fprintf(fp,"%s %d %d %d %d %lf %s\n",w[i].accountID,w[i].year,w[i].yue,w[i].r,w[i].type,w[i].money,w[i].toAccunt);
206 }
207 fclose(fp);
208
209 char str[25];
210 fp=NULL;
211 fp=fopen("account.txt","w");
212 for(int i=0; i<number; ++i)
213 {
214 sprintf(str,"%d",m[i].password);
215 int len=strlen(str);
216 fprintf(fp,"%s %s ",m[i].ID,m[i].name);
217 for(int i=0; i<len; ++i)
218 {
219 int ans=str[i]-'0';
220 ans*=Key;
221 if(i!=len-1)
222 fprintf(fp,"%d",ans);
223 else fprintf(fp,"%d ",ans);
224 }
225 fprintf(fp,"%lf\n",m[i].money);
226 }
227 fclose(fp);
228 }
229 void Menu()
230 {
231 int x;
232 while(1)
233 {
234 system("cls");
235 printf ( " \n");
236 printf ( " \n");
237 printf ( " \n");
238 printf ("-------------------------------------- \n");
239 printf ("--------------------------------------\n");
240 printf ("--------丨[0]查看自己信息 丨---\n");
241 printf ("--------丨[1]查看自己交易信息 丨---\n");
242 printf ("--------丨[2]转账 丨---\n");
243 printf ("--------丨[3]存钱 丨---\n");
244 printf ("--------丨[4]取钱 丨---\n");
245 printf ("--------丨[5]结束 丨---\n");
246 printf ("----------输入相应数字----------------\n");
247 printf ("--------------------------------------- \n");
248 printf ( " \n");
249 printf ( " \n");
250 scanf("%d",&x);
251 if(x==0)
252 {
253 Find_money();
254 }
255 else if(x==1)
256 {
257 Find_message();
258 }
259 else if(x==2)
260 {
261 Conversion();
262 }
263 else if(x==3)
264 {
265 Save_money();
266 }
267 else if(x==4)
268 {
269 Get_money();
270 }
271 else if(x==5)
272 {
273 system("cls");
274 printf ("-------------------------------------- \n");
275 printf ("--------------------------------------\n");
276 printf ("--------丨 丨---\n");
277 printf ("--------丨 谢谢你的使用 丨---\n");
278 printf ("--------丨 丨---\n");
279 printf ("--------丨 请保存好银行卡 丨---\n");
280 printf ("--------丨 丨---\n");
281 printf ("--------丨 丨---\n");
282 printf ("--------------------------------------- \n");
283 Quit();
284 return;
285 }
286 }
287 }
288 int main()
289 {
290 printf ("-------------------------------------- \n");
291 printf ("--------------------------------------\n");
292 printf ("--------丨 丨---\n");
293 printf ("--------丨 丨---\n");
294 printf ("--------丨 丨---\n");
295 printf ("--------丨 欢迎使用ATM机 丨---\n");
296 printf ("--------丨 丨---\n");
297 printf ("--------丨 丨---\n");
298 printf ("--------------------------------------- \n");
299 system("pause");
300 init();
301 Login();
302 if(now>=0)
303 Menu();
304 return 0;
305 }

仿ATM程序软件的更多相关文章

  1. 怎样将IPhone应用程序软件公布到应用程序商店?

    转自:http://www.shtion.com/667.html 怎样将IPhone应用程序软件公布到应用程序商店? 2009年10月19日公布 分类: App store, iphone, 手机应 ...

  2. Centos7使用yum安装程序软件时提示未找到安装包解决方法

    查找程序软件源,以sshd为例,假设sshd安装包无法找到,那么可以通过以下方法解决 yum provides sshd 然后我们就可以安装*.X86_64的程序软件源 例如yum install o ...

  3. Windows 开发之VC++垃圾清理程序软件

    概述 本程序软件的主要实现垃圾文件清理的功能,即对指定的文件格式的临时文件或垃圾文件进行遍历.扫描.显示.删除清理等功能.在程序界面设计方面,对默认对话框重新自定义绘制,主要包括标题栏的重绘.对话框边 ...

  4. 用AutoHotkey的热字串功能启动常用电脑程序软件 Version 2 Build 20191214

    ; 用AutoHotkey的热字串功能启动常用电脑程序软件 Version 2 Build 20191214 ; 电脑上的快捷键太多了,记都记不住,容易冲突和搞混,所以做了个热字串启动; 用法:运行此 ...

  5. appStore上传苹果应用程序软件发布流程

    如有疑问,或者需要人帮忙,可以到QQ群:460325065首先确定帐号是否能发布, https://developer.apple.com/account,如果你打开Provisioning Port ...

  6. Microsoft Visual Studio 开发的C++程序软件发布相关事宜

    VS2005/VS2008软件发布: Debug版本: 非MFC程序: 编译选项mdd: 仅依赖C++库和C运行时库,需要到VS2005/VS2008下安装目录VC/redist/Debug_NonR ...

  7. 【转】appStore上传苹果应用程序软件发布流程

    转载地址:http://blog.sina.com.cn/s/blog_68661bd801019uzd.html 首先确定帐号是否能发布, https://developer.apple.com/a ...

  8. appStore上传苹果应用程序软件发布流程(之前都是同事发,复制一份备用)

    首先确定帐号是否能发布, https://developer.apple.com/account,如果你打开Provisioning Portal,然后点击DisTribution看到的是下图中那样, ...

  9. 解决Mac应用程序软件不出现在Launchpad里面的方法

    新装了几个软件,可是打开Lauchpad之后却在里面找不到,真是烦人!然后尝试了以下方法: 1.重启电脑,没用: 2.尝试打开“应用程序(英文名称:Applications)”并找到安装的软件,然后直 ...

随机推荐

  1. FAT32、NTFS、exFAT有什么区别?

    文件系统 我们经常会对电脑硬盘.U盘.移动硬盘进行格式化,而在格式化硬盘的时候会弹出文件系统的选项,分别有FAT32.NTFS.exFAT三种格式,那么FAT32.NTFS.exFAT有什么区别? 在 ...

  2. 【Linux】Linux介绍和安装 - 测试题

    第一部分测试题 Linux介绍和安装 测试题 做点练习题,巩固一下咯~ ~ _ 10 个选择题. 1.让我们选择开机时进哪个操作系统的软件叫什么? A. booter B. bootloader C. ...

  3. 【Java】面向对象 - 封装

    继承 封装 多态 重新搞一波 复习巩固 简单记录 慕课网 imooc Java 零基础入门-Java面向对象-Java封装 封装 封装是什么? 将类的某些信息隐藏在类内部,不允许外部程序直接访问 通过 ...

  4. LeetCode108.有序数组转二叉搜索树

    题目 1 class Solution { 2 public: 3 TreeNode* sortedArrayToBST(vector<int>& nums) { 4 if(num ...

  5. CVE-2018-1273 Spring Data Commons 远程命令执行漏洞复现

    一.漏洞描述 Spring Data是一个用于简化数据库访问,并支持云服务的开源框架,Spring Data Commons是Spring Data下所有子项目共享的基础框架.Spring Data ...

  6. 【Android】编译报错 Annotation processors must be explicitly declared now 解决方案

    问题 在网上下载一个demo,因为版本久远,里面添加了本地 Butter Knife 的jar包,在编译时报错 Annotation processors must be explicitly dec ...

  7. 解决安装mysql动态库libstdc++.so.6、libc.so.6版本过低问题

    初始化mysql报错: ./bin/mysqld: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by ...

  8. ubuntu更新下载软件卡住0% [Connecting to archive.ubuntu.com (2001:67c:1360:8001::23)]

    一台ubuntu系统,查看硬件和配置环境的时候发现下载卡住了 根据提示就是有ipv6地址,系统也是配置了ipv6地址的.海外机器,而且可以ping通域名 最佳解决方案 我想出了如何让apt-get再次 ...

  9. C指针的这些使用技巧,掌握后立刻提升一个Level

    这是道哥的第016篇原创 关注+星标公众号,不错过最新文章 目录 一.前言 二.八个示例 1. 开胃菜:修改主调函数中的数据 2. 在被调用函数中,分配系统资源 2.1 错误用法 2.2 正确用法 3 ...

  10. What is :: (double colon) in Python when subscripting sequences?

    What is :: (double colon) in Python when subscripting sequences? 15 Extended Slices https://docs.pyt ...