关于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("输入有误或者余额不足!");
}
}
}
posted @ 2020-12-07 17:52  阿白i  阅读(144)  评论(0)    收藏  举报