package 临时; import java.util.Scanner; public class xioafei { public static void main(String[] args){ Scanner input=new Scanner(System.in); System.out.print("请输入您的消费总额:"); int zongE=input.nextInt(); System.out.println(); System.out.println("请出示您的会员卡:"); int huiYuan=input.nextInt(); if(huiYuan==1) { double shiJi=zongE*0.6; if(huiYuan==2) { shiJi=zongE*0.7; if(huiYuan==3) { shiJi=zongE*0.8; if(huiYuan==4) { shiJi=zongE*0.85; if(huiYuan==5) { shiJi=zongE*0.9; if(huiYuan==6) { shiJi=zongE*0.95; } } } } } } double zheKou=zongE-shiJi; System.out.println("消费总金额为"+zongE+"元,实际支付"+shiJi+"元,折后为"+zheKou+"元。"); } }
李晓健