用C语言怎么编写ATM机的程序

来源:百度知道 编辑:UC知道 时间:2024/06/09 02:32:00
以下这个程序的第13行的“clrscr();”语句有错误
,错误原因是undeclared identifier
第15行“while((a[i]=getch())!=13)” 也有错误,原因也是undeclared identifier
就这两个错误,请大家帮忙改一下,这个程序就能用了!

#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

加头文件 include<conio.h>
估计还是有问题的

把“clrscr();”改为 system("cls");

楼上的是暂停函数
你加#include <conio.h>
因为你调用函数必须要指定头文件!