#include<iostream>
#include<string>
using namespace std;
int main()
{
int x=123456;
char y[20]="123456",b[20],f[20]={0},g[20]={0},h[20]={0};
int z=10000;
int a,c,d,e,j=0;
xin:
cout<<"请输入账号:";
cin>>a;
cout<<"请输入密码:";
cin>>b;
if((strcmp(b,y)!=0)||a!=x)
{cout<<"*********账号密码不正确,请核对后再输入!*********\n";goto xin;}
else
{
cout<<"*********欢迎登陆ATM柜员机系统!*********\n";
here:
cout<<"【1】查询余额\t\t【2】取款\n【3】存款\t\t【4】修改密码\n【5】退出\t\t请按提示选择您想要的服务:";
cin>>c;
switch(c)
{
case 1:cout<<"您的余额为:"<<z<<endl;
goto here;
break;
case 2:{jin:
cout<<"输入您要取得数额(单位:百元):";
cin>>d;
if(d*100>5000)
{cout<<"支取金额不允许透支!\n";goto jin;}
else
c++大作业之ATM的模拟程序
最新推荐文章于 2023-12-21 12:30:01 发布