ATMC语言编程源代码

合集下载

C语言ATM自动存取款机全套代码

C语言ATM自动存取款机全套代码

C语言ATM自动存取款机全套代码#include#include#include#include#include#define N 6char b[N]={'8','8','8','8','8','8'};//存放密码int money=5000;int securitytime=3;void Login();void JieMian();void SaveMoney();void GetMoney();void Query();void Return();//密码验证函数,验证成功返回1,否则返回0void Login(){char a[20],ch; //用户登录密码,用以验证int i=0,n=1,k;printf("\n\t\t欢迎使用ICBC ATM自动存取款机\n"); printf("\n请输入密码:");for(n=1;n<=5;n++){while((a[i]=getch())!=13){ i=i+1;printf("*");//将用户输入的密码以*显示}for(k=0;k<6;k++)if(a[k]!=b[k]) break;if (k==6){printf("\n密码正确,请继续!!\n");JieMian(); }else//printf("\n密码错误,请重新输入:\n");printf("\n密码错误,您还有%d次机会,请重新输入:\n",5-n);}printf("\n您已经输入5次错误,您的卡将被没收,请去相关网点办理!\n");exit(1);}// 界面设计void JieMian(){int SelectKey;//system("cls");//清屏幕函数while(1){puts("\n= = = = = = = = = = = = = = = =");puts("| 请选择相应功能: |");puts("| 1. 修改密码PassWord |");puts("| 2. 查询功能Query |");puts("| 3. 取款功能Get Money |");puts("| 4. 存款功能Save Money | ");puts("| 5. 转帐功能Trans Money | ");puts("| 6. 退出功能Return | ");puts("\n= = = = = = = = = = = = = = = = ");printf("\n请选择功能:");scanf("%d",&SelectKey);switch(SelectKey){ case 1:printf("\n修改密码功能\n");//PassWord();break;case 2:printf("\n查询功能\n");Query();break;case 3:printf("\n取款功能\n");GetMoney();break;case 4:printf("\n存款功能\n");SaveMoney();break;case 5:printf("\n转帐功能\n");//Trans();break;case 6:printf("\n退出功能\n");Return();break;}}}/*Query查询功能*/void Query(){system("cls");puts("================================== ==");printf("| Your Query balance is $%ld |\n",money);puts("| Press any key to return... |");puts("================================== ==");return;}/*GetMoney取钱功能*/void GetMoney(){char GetMoney;char kahao[20];long y;//输入待转入的相关信息//卡号,姓名do{puts("=================================");puts("| Please select GetMoney: |");puts("| 1. $100 |");puts("| 2. $200 |");puts("| 3. other |");puts("| 4. Return |");puts("=================================");GetMoney = getch();}while(GetMoney!='1'&&GetMoney!='2'&&GetMoney!='3' && GetMoney!='4');switch(GetMoney){case '1':system("cls");if(money>100){puts("================================== =========");puts("| Your GetMoney is $100,Thank you! |");puts("| Press any key to return... |");puts("===========================================");money=money-100;printf("\n您的余额为%d",money);}else printf("\n您的余额不足!");getch();break;case '2':system("cls");if(money>200){puts("================================== ======");puts("| Your GetMoney is $200,Thank you! |");puts("| Press any key to return... |");puts("================================== ======");money=money-200;printf("\n 您的余额为%d",money);}else printf("\n您的余额不足!");getch();break;case '3':system("cls");printf("please get some money:");scanf("%ld",&y);if(money>y){money=money-y;printf("\n您的余额为%d",money);}else{printf("\n您的余额不足!");printf("\n您的余额为%d",money);}getch();break;case '4': break;}return;}/*SaveMoney存钱功能*/void SaveMoney(){ char SaveMoney;long y;do{system("cls");puts("================================== ========");puts("| Please select Save Money: |");puts("| 1. $100 |");puts("| 2. $500 |");puts("| 3. $1000 |");puts("| 4. other |");puts("| 5. Return |");puts("================================== ========");SaveMoney = getch();}while(SaveMoney!='1'&&SaveMoney!='2'&& SaveMoney!='3'&&SaveMoney!='4'&&SaveMoney!='5');switch(SaveMoney){ case '1':{{system("cls");puts("================================== =========");puts("| Your save money is $100,Thank you! |");puts("| Press any key to return... |");puts("================================== ========");}money=money+100;printf("\n您的余额为%d",money);getch();}break;case '2':{system("cls");puts("================================== ============");puts("| Your Save Money is $500,Thank you! |");puts("| Press any key to return... |");puts("================================== ============");money=money+500;printf("\n您的余额为%d",money);getch();}break;case '3':{system("cls");puts("============================================");puts("| Your Save Money is $1000,Thank you! |");puts("| Press any key to return... |");puts("================================== ==========");money=money+1000;printf("\n您的余额为%d",money);getch();}break;case '4':{system("cls");puts("================================== ===========");puts("| Your Save some Money,Thank you! |");puts("| Press any key to return... |");puts("================================== ===========");puts("please save some money:");scanf("%ld",&y);if(y%100!=0)printf("该存款机只能处理整百的操作,请核查!!");else{money=money+y;printf("\n您的余额为%d",money);}getch();}break;case '5':break; }return;}/*Return,退出功能*/void Return(){system("cls");puts("================================== ==");puts("| Thank you for your using! |");puts("| RETURN! |");puts("================================== ==");exit(1);}//主函数int main(){Login();}上一页下一页。

C语言ATM机代码

C语言ATM机代码

#include<stdio.h>#include<stdlib.h>#include<direct.h>#include<string.h>#include<conio.h>typedef struct /*定义结构体*/{int cid /*账号*/;char name[20] /*姓名*/;char pws[20] /*密码*/;int money /*金额*/;} CAT;void create();void service();int GetNewId();void PutNewId();int submit();void get(int,int);void save(int,int);int chaxun(int);void transfer(int);void ChPsw(int);void load();void rload();void main(){int chose/*首页菜单选择*/;printf("\n\n\n\n\n");printf(" ******** 欢迎光临******** \n");printf(" * * \n");printf(" * 这是JJ银行自助系统* \n");printf(" * * \n");printf(" * 欢迎您的使用* \n");printf(" * *\n");printf(" * 人民币* \n");printf(" * * \n");printf(" * 因您而精彩!!! * \n");printf(" * * \n");printf(" ********** ********** \n\n");printf(" 系统正在加载");load();system("cls");TT: //主界面system("cls");printf("\n");printf("****************************欢迎使用JJ自助银行系统!***************************\n");printf("**\n");printf("* 1.开户*\n");printf("* 2.服务*\n");printf("* 3.取卡*\n");printf("**\n");printf("******************************************************************\n");printf("\n");printf("请选择您要交易的类型:");scanf("%d",&chose);printf("\n");while(!(chose>=1 && chose<=3)) //判断选择是否正确{printf("您选择的类型不正确,请重新选择:");scanf(" %d",&chose);printf("\n");if(chose>=1 && chose<=3)break;}switch(chose) //功能菜单选择{case 1: //开户create();goto TT;break;case 2:service();goto TT;break;case 3:printf("请取回您的磁卡!\n");break;}printf("\n");system("pause");}void create(){CAT a/*用户信息*/;int i/*数组变量控制*/;char spsw[20];system("cls");printf("\n");printf("**************************** 这里是开户菜单*****************************\n\n");a.cid=GetNewId();printf("开户账号为: %d \n\n",a.cid);printf("请设置账号信息...\n\n");printf("请设置姓名: ");scanf("%s",);printf("请设置账号密码:");i=0;while((a.pws[i]=getch())!=13) //设置密码以*号显示{putchar('*');i++;}a.pws[i]='\0';printf("\n请输入确认密码:");i=0;while((spsw[i]=getch())!=13){putchar('*');i++;}spsw[i]='\0';while(strcmp(a.pws,spsw)!=0){printf("\n确认密码错误请重新输入:");i=0;while((spsw[i]=getch())!=13){putchar('*');i++;}spsw[i]='\0';}printf("\n请输入开户金额:");scanf("%d",&a.money);printf("\n\n");printf("账号为:%d\n",a.cid); //输出设置账号printf("姓名为:%s\n",);printf("密码为:%s\n",a.pws); //输出设置密码printf("余额为:%d",a.money);printf("\n\n");printf("开户成功!\n");printf("请妥善保管您的账号和密码!\n\n");PutNewId(a);printf("按任意键返回。

用c语言编写的一个ATM取款机程序

用c语言编写的一个ATM取款机程序

⽤c语⾔编写的⼀个ATM取款机程序学了⼀个多星期的c语⾔了,⽼师布置来了作业,⽤C编写个ATM机的模拟程序,客户界⾯有,取款,2存款,3转账,4退出。

并且要求输⼊错误后,有三次机会重输,定义输⼊密码hellowold,⽤switch分⽀。

#include<stdio.h>#include<string.h>#define key "hellowold"//定义密码#define zhanghu "123456789"#define line "==================\n"int num;//选择类型char arr[20];//定义数组char password[20];//定义数组int money;//取款⾦额int i=0;int main(){printf(line);printf("\t1取款\n");printf("\t2存款\n");printf("\t3转账\n");printf("\t4退出\n");printf(line);printf("请选择操作类型: \n");scanf("%d",&num);switch(num){case1:{ do{printf("请输⼊密码:\n");scanf("%s",&password);if(strcmp(key,password)==0){printf("请输⼊取款⾦额:\n");scanf("%d",&money);printf("请取⾛你的%d⽑爷爷",money);break;}else{printf("密码输⼊错误");}i++;}while((strcmp(key,password)!=0)&&i<=2);}}第⼆步存款,定义账号#include<stdio.h>#include<string.h>#define key "hellowold"//定义密码#define zhanghu "#define other "ni de mao ye ye"#define line "==================\n"int num;//选择类型char arr[20];//定义数组char password[20];//定义数组char others[20];int money;//取款⾦额int num2;//存款⾦额int i=0;int main(){printf(line);printf("\t1取款\n");printf("\t2存款\n");printf("\t3转账\n");printf("\t4退出\n");printf(line);printf("请选择操作类型: \n");scanf("%d",&num);switch(num){case1:{ do{printf("请输⼊密码:\n");scanf("%s",&password);if(strcmp(key,password)==0){printf("请输⼊取款⾦额:\n");scanf("%d",&money);printf("请取⾛你的%d⽑爷爷",money);break;}else{printf("密码输⼊错误");}i++;}while((strcmp(key,password)!=0)&&i<=2);break;}今天先变到这⾥吧,作业还多着了,排版不是很好看,就将就这看吧。

C语言模拟ATM机的编写程序

C语言模拟ATM机的编写程序

C语言模拟ATM机的编写程序#include <stdio.h>void main(){long int a,b,c,d,e,f,g,k,l,m,n,o,p,h;n=0;h=10000;k=123456;loop0: printf("\t\t\t欢迎使用中国邮政ATM取款机!\n\n");printf("请插入你的银行卡,并输入你的密码,三次密码输入错误,将终止程序:\n");scanf("%ld",&l);if(k==l){loop1: printf("请输入你选择的操作类型:\n");printf("请输入0-4进行选择:\n");printf("1:<转账>\t2:<查询>\t3:<取款>\t4:<修改密码>\t0:<取卡>\n");scanf("%ld",&a);switch(a){case 1: printf("请输入转账账号:\n");scanf("%d",&o);printf("请输入你需要转账的金额:\n");scanf("%d",&p);printf("请输入你选择的操作类型:\n");printf("请输入0或1进行选择:\n");printf("1:<确认>\t0:<返回>\n");h=10000-p;scanf("%ld",&b);switch(b){case 1:printf("\n转账%d元人民币成功!\n\n",p);goto loop1;break;case 0:goto loop1;break;default :printf("\n无此操作项!\n\n");goto loop1;}break;loop4:case 2:printf("请输入你选择的操作类型:\n");printf("请输入0-2进行选择:\n");printf("1:<查询余额>\t2:<查询明细>\t0:<返回>\n");scanf("%ld",&c);switch(c){case 1:printf("\n你的余额为:%5d\n\n",h);goto loop1;break;case 2:printf("\n你的账单为:******。

c语言atm机编程代码

c语言atm机编程代码

c语言atm机编程代码下面是一个简单的C语言ATM机编程代码示例:#include <stdio.h>// ATM机账户结构体typedef struct {int account_number;float balance;} Account;// 初始化账户信息void init_account(Account *account, int acc_no, float bal) { account->account_number = acc_no;account->balance = bal;}// 存款void deposit(Account *account, float amount) {account->balance += amount;}// 取款void withdraw(Account *account, float amount) {if (account->balance >= amount) {account->balance -= amount;} else {printf("余额不足!\n");}}// 查询余额void check_balance(Account *account) {printf("当前余额:%.2f\n", account->balance); }// 主函数int main() {Account my_account;int choice;float amount;// 初始化账户信息init_account(&my_account, 123456789, 5000.0);// ATM机操作菜单printf("欢迎使用ATM机!\n");printf("请选择操作:\n");printf("1. 存款\n");printf("2. 取款\n");printf("3. 查询余额\n");printf("0. 退出\n");do {printf("请输入操作代码:");scanf("%d", &choice);switch (choice) {case 1:printf("请输入存款金额:");scanf("%f", &amount);deposit(&my_account, amount); break;case 2:printf("请输入取款金额:");scanf("%f", &amount);withdraw(&my_account, amount); break;case 3:check_balance(&my_account);break;case 0:printf("退出程序!\n");break;default:printf("无效的操作!\n");}} while (choice != 0);return 0;}。

自动取款机源代码(C and C++)

自动取款机源代码(C and C++)

#include <iostream.h>
#include <fstream.h>
#include <stdio.h>
#include <time.h>
#include <string.h>
#include <windows.h>
struct Acount{
char name[20];
if(x>0)
cout<<"| 交易类型 | 现金存款 |"<<endl;
else
{ x=-x;
cout<<"| 交易类型 | 现金取款 |"<<endl;
{
int n;
fstream file("账号.dat",ios::binary|ios::nocreate|ios::in|ios::out);
if(!file)
{
cout<<"不能打开此文件"<<endl;
return 0;
} Βιβλιοθήκη n=0; cout<<"| 交易批号 | 198447 |"<<endl;
cout<<"| 时间/日期 | "<<time<<" |"<<endl;
cout<<"+-----------------------------------------------------------------+"<<endl;

ATM代码

ATM代码
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
struct Vip
{int id;
char mima[6];
char name[20];
int money;
}cat;
int gotoxy(int row,int col)
}
while(b==4)
{
getchar();
system("cls");
return 0;
break;
}
return 0;
}
int zz()
{
int zh,zh1;
int h;
printf("在这里完成转账\n");
getchar();
getchar();
system("cls");
return 0;
break;
}
while(a==6)
{
getchar();
system("cls");
printf("在这里开户\n");
printf("开户账号:%d\n\n");
printf("设置姓名:");
scanf("%s",&cat_);
printf("设置密码:\n");
i=0;
while((mima[i]=getchar())!=13)
gotoxy(1,25);
printf("请输入您的选择:");

C语言ATM(有文件输入输出)

C语言ATM(有文件输入输出)
void cunkuan( )
{
double cun;
system("cls");
fp=fopen("银行后台.txt","rb+");
if(fp==NULL)
{
printf("打开失败\n");
return;
}
while(fread(&k,sizeof(k),1,fp))
{
if(k.zhanghao==z)
int temp=3;
system("cls");
printf("*请输入密码*\n");
scanf("%d",&code);
while(code!=k.mima)
{
temp--;
system("cls");
printf("*密码错误,请重新输入*\n");
printf("*您还有");
printf("%d",temp);
{
break;
}
}
printf("请输入您要存入的金额:");
scanf("%lf",&cun);
if(cun<0)
{
system("cls");
printf("非法存款\n");
printf("请重新输入\n");
scanf("%lf",&cun);
}
k.yu_e+=cun;
system("cls");
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

#include<stdio.h>/*引用库函数*/#include<stdlib.h>#include<string.h>#include<conio.h>#include<time.h>#define ZHANGHUSHU 10#define JIAOYISHU 20int caidan();/*登录注册菜单*/void zhuce();void denglu();void baocunshuju();int menu();/*主菜单*/void cunkuan();void qukuan();void zhuanzhang();void chaxun();void xiugaimima();struct JiaoYi /*定义交易结构体*/{char shijian[50];/*时间*/char leixing[3];/*类型*/float jine; /*金额*/float yue;/*余额*/};struct ZhangHu /*定义账户结构体*/{char xingming[17];/*姓名*/char zhanghao[12];/*账号*/char shenfenzheng[19]; /*身份证*/char mima[7]; /*密码*/float yue; /*余额*/struct JiaoYi jiaoyi[JIAOYISHU]; /*在账户的结构体中在定义交易的结构体*/int jiaoyishu;};struct ZhangHu zhanghu[ZHANGHUSHU]; /*定义账户数来确定账户这一结构体中有多少个体*/ int j; /*当前账户*/int zhanghushu;int k;/*交易帐号*/int jiaoyishu;void xianshizhanghu();int caidan()/*菜单函数*/{char c;do{system("cls"); /*每次选择运行前清屏*/printf("\t\t =================欢迎使用ATM系统===============\n\n"); /*菜单选择*/printf("\t\t * 1. 注册* *\n");printf("\t\t * 2. 登录 *\n");printf("\t\t * 3. 保存数据 *\n");printf("\t\t * 0. 退出 *\n");printf("\t\t ===============================================\n");printf("\t\t\t请作出选择(0-3):");c=getchar(); /*读入选择*/}while(c<'0'||c>'3');return(c-'0'); /*c变为空后返回重新选择*/}/*根据主菜单的返回值来确定主函数的值*/void zhuce(){printf("\n\t\t请输入姓名:");scanf("%s",zhanghu[zhanghushu].xingming);printf("\n\t\t请输入帐号:");scanf("%s",zhanghu[zhanghushu].zhanghao);do{printf("\n\t\t请输入身份证:");scanf("%s",zhanghu[zhanghushu].shenfenzheng);if(strlen(zhanghu[zhanghushu].shenfenzheng)==18)break;elseprintf("\n\t\t身份证必须是18,请重新输入!");}while(1);do{ printf("\n\t\t请输入密码:");scanf("%s",zhanghu[zhanghushu].mima);if(strlen(zhanghu[zhanghushu].mima)==6)break;elseprintf("\n\t\t密码必须是6位,请重新输入!");}while(1);zhanghu[zhanghushu].yue=0;zhanghu[zhanghushu].jiaoyishu=0;zhanghushu++;xianshizhanghu();}void xianshizhanghu() /*显示账户函数来显示所输入的账户*/{int i;for(i=0;i<zhanghushu;i++){printf("\n\n\t帐号\t姓名\t身份证\t\t密码\t余额\n");printf("\t%s\t%s\t%s\t%s\t%.2f\n",zhanghu[i].zhanghao,zhanghu[i].xingming,zhanghu[ i].shenfenzheng,zhanghu[i].mima,zhanghu[i].yue);system("pause");}}void denglu() /*登录函数*/{char zhanghao[12],mima[7];int i=0;int mimacishu=1;printf("\n\t\t请输入帐号:");scanf("%s",zhanghao);while(strcmp(zhanghao,zhanghu[i].zhanghao)!=0&&i<zhanghushu)i++; /**/if(i==zhanghushu)return;do{printf("\n\t\t请输入密码:");scanf("%s",mima);if(strcmp(mima,zhanghu[i].mima)!=0){if(mimacishu==3){printf("你已输入错误三次,你不能在输.");system("pause");return;}else{printf("密码错误请重新输入:");mimacishu++;}}elsebreak;}while(1);for(;;)switch(menu()) /*选择判断*/{case 1:cunkuan();break;case 2:qukuan();break;case 3:zhuanzhang();break;case 4:chaxun();break;case 5:xiugaimima();break;case 0:return;}}}void baocunshuju()/*保存数据*/{int i,j;FILE *fp;char [20];printf("\t\t\t将数据保存到一个文本文件中\n");/*输入文件名*/printf("\t\t\t请输入文件名");fflush(stdin);scanf("%s",);if((fp=fopen(,"w"))==NULL)/*打开文件*/{printf("无法创建此文件\n");system("pause");return;}fprintf(fp,"%d\n",zhanghushu);/*循环写入数据*/printf("\t帐号\t\t姓名\t\t身份证\t\t密码\t余额\t交易数");for(i=0;i<zhanghushu;i++){fprintf(fp,"\t%15s%10s%20s%10s\t%10.2f\t%5d\n",zhanghu[i].zhanghao,zhanghu[i].xing ming,zhanghu[i].shenfenzheng,zhanghu[i].mima,zhanghu[i].yue,zhanghu[i].jiaoyishu);for(j=0;j<zhanghu[i].jiaoyishu;j++)fprintf(fp,"%30s%10s%10.2f%10.2f\n",zhanghu[i].jiaoyi[j].shijian,zhanghu[i].jiaoyi [j].leixing,zhanghu[i].jiaoyi[j].jine,zhanghu[i].jiaoyi[j].yue);fclose(fp);}void duqushuju(){int i,j;FILE *fp;char [20];printf("\n\n\n\t请输入欲读入数据的文件名:\n");fflush(stdin);gets();if(strlen()==0)return;elseif((fp=fopen(,"r"))==NULL)/*打开文件*/{printf("无法打开此文件\n");system("pause");return;}else{printf("\t\t成功打开文件.\n");getch();}fscanf(fp,"%d\n",zhanghushu);for(i=0;i<zhanghushu;i++){fscanf(fp,"%15s%10s%20s%10f\t%10f%5d\n",zhanghu[i].zhanghao,zhanghu[i].xingming,zhanghu[i].shenfenzheng,zhanghu[i].mima,&zhanghu[i].yue,&zhanghu[i].jiaoyishu);for(j=0;j<zhanghu[i].jiaoyishu;j++){fgets(zhanghu[i].jiaoyi[j].shijian,30,fp);fscanf(fp,"%5s%10f\t%10f\n",zhanghu[i].jiaoyi[j].leixing, &(zhanghu[i].jiaoyi[j].jine),&(zhanghu[i].jiaoyi[j].yue));}}fclose(fp);}int menu(){char c;{system("cls");printf("\n\n\t================= 欢迎使用 XXX银行ATM==================\n\n");printf("\t=====================请选择服务=====================\n");printf("\t* *\n");printf("\t* 1 实时存款 2 取款服务 *\n");printf("\t* *\n");printf("\t* 3 转账服务 4 查询 *\n");printf("\t* *\n");printf("\t* 5 修改密码 6 退出 *\n");printf("\t* *\n");printf("\t====================================================\n");printf("\t\t\t请作出选择(1-7):");c=getchar(); /*读入选择*/system("pause");}while(c<'1'||c>'7');return(c-'0'); /*c变为空后返回重新选择*/}void cunkuan() /*存款函数*/{float cunkuanjine;/*输入的存款金额*/int k;int i;char t[30];time_t rawtime;struct tm *timeinfo;time(&rawtime);timeinfo=localtime(&rawtime);strcpy(t,asctime(timeinfo));for(i=0;t[i]!='\0';i++)if(t[i]=='\n'){t[i]='\0';break;}printf("请输入存款金额(存款金额必须大于0,不超过10000,必须是100元的面额\n"); scanf("%f",&cunkuanjine);if(cunkuanjine<=0||cunkuanjine>1000||(int)cunkuanjine%100!=0){printf("金额不符合要求,请重新选择");return;}else{k=zhanghu[j].jiaoyishu;strcpy(zhanghu[j].jiaoyi[k].shijian,t);strcpy(zhanghu[j].jiaoyi[k].leixing,"存");zhanghu[j].jiaoyi[k].jine=cunkuanjine;zhanghu[j].yue+=cunkuanjine;zhanghu[j].jiaoyi[k].yue=zhanghu[j].yue;zhanghu[j].jiaoyishu++;printf("\n\\t\t\t您本次存了%.2f元\n",cunkuanjine);printf("\n\\t\t\t您的余额为%.2f元\n",zhanghu[j].yue);printf("\n时间为:%s\n",zhanghu[j].jiaoyi[k].shijian);printf("\n类型为:%s\n",zhanghu[j].jiaoyi[k].leixing);system("pause");}}void qukuan() /*取款函数*/{int k;/*交易下标*/float qukuanjine;int i;char t[30];time_t rawtime;struct tm *timeinfo;time(&rawtime);timeinfo=localtime(&rawtime);strcpy(t,asctime(timeinfo));for(i=0;t[i]!='\0';i++)if(t[i]=='\n'){t[i]='\0';break;}printf(" 取款服务 \n");printf("\t=====================请选择服务=====================\n");printf("\t* *\n");printf("\t* 1 100 2 200 *\n");printf("\t* *\n");printf("\t* 3 500 4 1000 *\n");printf("\t* *\n");printf("\t* 5 其他金额 6 返回主菜单 *\n");printf("\t* *\n");printf("\t====================================================\n"); scanf("%f",&qukuanjine);if(qukuanjine<=0||qukuanjine>10000||(int)qukuanjine%100!=0){printf("金额不符合要求,请重新选择");return;}elseif(zhanghu[j].yue<qukuanjine){printf("你的账户余额不足,不能完成这项操作。

相关文档
最新文档