#代码
string pass;
int count = 0;
int amount = 0;
string password = "1111111";
bool ispass = false;
while (!ispass && count < 3)
{
Console.WriteLine("请输入密码");
pass = Console.ReadLine();
if (password != password)
{
count++;
continue;
}
do
{
Console.WriteLine("请输入金额");
amount=Convert.ToInt32(Console.ReadLine());
if(amount>1000||amount%100!=0)
{
continue;
}
else
{
break;
}
}while(amount>0);
ispass=true;
}
if(ispass)
{
Console.WriteLine("你取了{0}",amount);
Console.WriteLine("交易完成,请去卡");
}
Console.ReadKey();
网友评论