#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();
}