【C语言】编写ATM机程序

来源:百度知道 编辑:UC知道 时间:2024/05/24 08:17:46
帮我用C语言编写一个ATM取款程序
要求代码在300行以上

作为一个二十一世纪的大学生,要养成自己动手的习惯!不懂就去图书馆翻阅资料!虽然网上现在很方便!但是不能养成这种坏习惯!
你应该想到如何借助旁边的资料,学校的图书馆就是个很好的地方!去哪找你要的程序肯定找得到!自己动手,丰衣足食!

// ************************************
// * *
// * ATM类的成员函数 *
// * *
// ************************************

#include "function.h"
#include
#include

void ATM::welcome()
{
times=0;
cout<<"$
欢迎使用若雪银行ATM自动取款机!~!
"<
char pwd[8],num[20],ch;
int i=0;
do
{
i=0;
cout< do
{
cin.get(ch);
num[i++]=ch;
}while(ch!='\n');
num[i-1]='\0';

i=0;
cout<<"请输入密码:";
do
{
cin.get(ch);
pwd[i++]=ch;
}while(ch!='\n');
pwd[i-1]='\0';

if(!check_passwd(num,pwd))
{
cout<<"你输入的卡号或密码有误,
请重新输入"< times++;
}
else
{
functionshow();
}
}while(times&