c语言银行三个窗口,c语言银行程序

#includemain(){

int a,c,d,e;

float b=10000;

int f;

int num=1;

printf("\t\t\t CHNIA BANK ATM\nplease input your secret code:\n");

scanf("%d",&a);

if(a==num){

printf(" welcome you to use your count,you have %.2f RMB!\n",b);

printf(" how much money do you want? please input the numbers: ");

scanf("%d",&e);

printf("\n");

c=b-e;

printf(" you till have : %d ,please choose exit or choose function ! \n",c);

scanf("%c",&d);

printf("\n");

}

else if(a!=num){

printf("your secret code is wrong,please input the correct secret code!\n");

}

printf("\t\t \tHELLO,WELCOME TO USE ATM\nplease choose you want function\n");

printf("\n\n");

printf("\t\t-----------------------------------\n");

printf("\t\t|\t\t|\t\t |\n");

printf("\t\t| 1. check\t| 2. withdraw money\t |\n");

printf("\t\t|\t\t|\t\t |\n");

printf("\t\t-----------------------------------\n");

printf("\t\t|\t\t|\t\t |\n");

printf("\t\t| 3. transfer account\t| 4. midify secret code|\n");

printf("\t\t|\t\t|\t\t |\n");

printf("\t\t-----------------------------------\n");

printf("\t\t|\t\t\t\t |\n");

printf("\t\t|\t 0. exit \t\t |\n");

printf("\t\t|\t\t\t\t |\n");

printf("\t\t-----------------------------------\n");

printf("please choose function:\n ");

scanf("%d",&f);

switch(f)

{ case 0:printf("exit");break;

case 1:printf("check");break;

case 2:printf("withdraw money");break;

case 3:printf("transfer account");break;

case 4:printf("midify secret code");break;

default :printf("it's wrong,please choose in 0~4!");

}

getch();

}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值