1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | import java.util.Scanner; public class A03 { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub Scanner input = new Scanner (System.in); System.out.println( "请输入会员积分:" ); int Integral=input.nextInt(); String show; if (Integral< 2000 ){ show= "0.9折" ; } else if (Integral>= 2000 &&Integral< 4000 ){ show= "0.8折" ; } else if (Integral>= 4000 &&Integral< 8000 ){ show= "0.7折" ; } else { show= "0.6折" ; } System.out.println( "该会员享受折扣是:" +show); } } |