关于java的if语句
import java.util.Scanner;
public class hjgfhtvg {
public static void main(String[]args)
{
int ye=50000;
int qk;
System.out.println("请输入取款金额");
Scanner sc=new Scanner(System.in);
qk=sc.nextInt();
if (qk%100==0 && qk<=ye) {
ye = ye - qk;
System.out.println("成功取款;" + qk + "元,卡上余额为:" + ye +"元");
}
else
{
System.out.println("输入有误或者余额不足!");
}
}
}

浙公网安备 33010602011771号