积分卡打折
Scanner input =new Scanner(System.in); System.out.println("请输入购物金额"); double money = input.nextDouble(); System.out.println("请输入积分"); int score=input.nextInt(); if (score<=2000) { money=money*0.9; }else if(score<=4000) { money=money*0.8; }else if(score<=8000) { money=money*0.75; }else { money=money*0.7; } System.out.println("您本次应缴金额为:"+money);