新手·小白

积分卡打折

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);

  

posted on 2021-09-20 21:33  新手·小白  阅读(16)  评论(0编辑  收藏  举报

导航