package qqt;
import java.util.Scanner;
public class ATM {
public int withdraw(String card,String pass,int money)
{
if(!card.equals("123456789"))
{
System.out.println("非法卡号");
}
else
{
if(!pass.equals("123456"))
{
System.out.println("错误的密码");
}
else
{
return money;
}
}
return 0;
}
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sn=new Scanner(System.in);
String card=sn.nextLine();
String pass=sn.nextLine();
//String pass="123456";
int money=25500;
ATM atm= new ATM();
int a=atm.withdraw(card, pass, money);
// String c=atm.card="12345677";
// atm.pass="12";
// atm.money=5000;
System.out.println("康洁取款成功"+a);
}
}
import java.util.Scanner;
public class ATM {
public int withdraw(String card,String pass,int money)
{
if(!card.equals("123456789"))
{
System.out.println("非法卡号");
}
else
{
if(!pass.equals("123456"))
{
System.out.println("错误的密码");
}
else
{
return money;
}
}
return 0;
}
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sn=new Scanner(System.in);
String card=sn.nextLine();
String pass=sn.nextLine();
//String pass="123456";
int money=25500;
ATM atm= new ATM();
int a=atm.withdraw(card, pass, money);
// String c=atm.card="12345677";
// atm.pass="12";
// atm.money=5000;
System.out.println("康洁取款成功"+a);
}
}