C语言编写ATM

来源:百度知道 编辑:UC知道 时间:2024/05/31 09:30:04
哪位大侠知道用C语言编写的ATM的代码啊...只要C的啊...(要可运行的)..谢谢啦...
这是我在其他地方找的.说是 switch语句执行不了不能运行.我一点都不懂.帮朋友找的.你们参考下嘛
http://post.baidu.com/f?kz=107762205这里是我找的其中一个..但是不能运行..求一个可以运行的..

#include <stdio.h>
void main()
{int e;
long y,z;
int i,q=9;
long x=2000;
char m,n,SelectKey,CreditMoney,DebitMoney;
{
char b[6]={'8','8','8','8','8','8'};
char a[20];
int i,n,k;
i=0;
clrscr();
printf("please input mima:");
while((a[i]=getch())!=13)
{
i=i+1;
printf("*");
}
for(k=0;k<6;k++)
if(a[k]!=b[k]) break;
if (i==6)
printf("\nthe password is right\n");
else
printf("\nthe password is wrong and input password again\n");
}
while(4)
{
do{
clrscr();
puts("=========================");
puts("| Please select key: |");
puts("| 1. Quary |");
puts("| 2. Credit |");
puts("| 3. Debit |");
puts("| 4. Return |");