自动取款机源代码

上传人:壹****1 文档编号:488805783 上传时间:2023-07-12 格式:DOC 页数:23 大小:417.50KB
返回 下载 相关 举报
自动取款机源代码_第1页
第1页 / 共23页
自动取款机源代码_第2页
第2页 / 共23页
自动取款机源代码_第3页
第3页 / 共23页
自动取款机源代码_第4页
第4页 / 共23页
自动取款机源代码_第5页
第5页 / 共23页
点击查看更多>>
资源描述

《自动取款机源代码》由会员分享,可在线阅读,更多相关《自动取款机源代码(23页珍藏版)》请在金锄头文库上搜索。

1、#include iostream.h #include fstream 。 h include stdio 。 h# in elude include string.h #include windows.h struct Aco untchar name20 ;int cardnu;int code ; double Ban;char time26 ;struct Acount user int i;void Welcome ()cout * endl;cout *? Oo e 1 o ?D?d ? o ?DDATM?i* e ndl;cout * * * * * * * * * * * *

2、n endl ;coutPleaseselect your native lanuage n endl;cout ”1. Englishn 2 。?D?n 3. Exit n endl ;cout ” Enter you choice between 1to 3: ;char *_time( )time_t rawtime; struct tm * timeinfo;&rawtime )time ( &rawtime ) timeinfo = localtimereturn asctime (timeinfo)int find(int card)i=-1;ifstream in” acount

3、.dat, ios:binary | ios : no create);if( ! in )return 0while(!in.eof i+;in.read( ifuser in.close return 0;)char * )&user,sizeofcardnu=card )user );in 。 closereturn 1);int cardnumber2 int nfstream in|ios:out);if(file!filecout2?return 0;?o?.dat,ios: binary|ios:nocreateios:u,o ?a ?t ”endl ;n=0;whilen)fi

4、le.readint m=0;file.seekpfilefilereturnvoid print2system ( char timestrcpytime24(char ) &n ,sizeof(int-4,ios write(char 。close( )n;cls ”) ;25;(time ,= ;);: :cur ) ;) m,sizeof(int);_time () );”endl ;endl;coutbi ?o ao ?e ? i ?e ndl;cout AUTOMATIC TELLER MACHINE HENER BANKING SYSTEM endl; cout CARDHOLD

5、ER BILL COPY 3? e ? ? u endl;cout ” +- - - - - +”endl ;cout |?u o?|10203|” endl ;cout+- - - - - +”endl;cout |?e| D? o ?|endl ;cout|?o?|user。cardnu ”|”endl ;cout|”endl;cout”|?oXaa Di|o ?DD?a? |IIendl;cout”|?oX ? u o?| 198447|”endl ;cout|e?/e?u|time |endl;cout+ - - - - -+endl;cout” | CAEDHOLEDER SINAT

6、UREendl;cout| 3?-e ?cout+- -+”endl ;cout” I ACKNOWLEDGESATISFACTORY RECEIPT OF RELATIVE SERVICES”void print2(int x)system (”cls ”); char time25 ; strcpy(time,_time();time24=;AUTOMATIC TELLER MACHINE HENER BANKING SYSTEMendlCARDHOLDER BILL COPY 3? e ? ? u endl;?u o?|10203coutcout cout+- -+ endl coute

7、ndl ;cout+ - - - - - - - -+endl;cout|?土 e|D? 0 ?|endl;cout |? o?|” user。cardnu|”endl;cout ”|endl;if (x0)cout |?oXdd Di |?e ?endl;else x= -x;cout”|? oXdd Di?e e?|”endl ;cout”|?ox?uo?|198447 |II endl;cout+- - - - - - - - - - - +”endl ;cout |e ?/ e ?u| time ” | endl ;cout ” |?ox ?e?|” x |”endl;cout+- -

8、 - - - - - - - - - - - - -+endl ;cout | CAEDHOLEDER SINATUREendl ;|endl;cout |3?e ?cout+-+endl;cout I ACKNOWLEDGE SATISFACTORY RECEIPT OF SERVICES”endl;cout ”? o a o ? e ? 1 ? ” e ndl;coutTem;user 。 Ban+=Tem;fstream out(acount.dat ”,ios::in|ios::out|ios :binaryout.seekp(i sizeof(user),ios :beg );out

9、 。 write (char 衣)&user,sizeof(user);out 。 close() ;cout ”t? o ? ? e ?” Te endl ;Sleep(3000);cout D eo a,do ? 1 ?eY= e ?. N =? ) och;if(ch= y | |ch= Y)print2 (Tem);RELATIVE);void Drawmoney2( )char ch;int Tem ;cout ? e ?e ?ue ?e? ?D?e ?100卩?e y ?;cin Tem;while(Tem100 )cout ” Sorry,?D? e?e?”;cin Tem;us

10、er 。 Ban =Tem ;fstream out(acount.dat,ios::in | ios:out|ios::binary);out.seekp (i*sizeof (user) ,ios ::beg);out 。 write (char *) & user , sizeof(user );out 。 close();cout ” ? u 30? ue ?x ?e ; ” Tem endl; Sleep (3000 ) ;coutch;if( ch=y|ch=Y)print2(-Tem );void Change2 ()int tem , j=3 ;cout ”?? e ?e ?卩??.? u ? ”;docintem;j- ;if(tem=user。 code )couttem;

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 办公文档 > 活动策划

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号