满意答案
dovelx
2017.01.19
采纳率:56% 等级:12
已帮助:11434人
12345678910111213141516171819202122232425262728293031public static void main(String[] args) { Scanner sc = new Scanner(System.in); boolean flag = true; while(flag){ System.out.println("请输入收入(元):\n输0退出"); int salary = sc.nextInt(); if(salary == 0){ flag = false; }else{ //超过部分 int other = salary - 3500; if (salary <= 3500) { System.out.println("不交税"); }else if (other <= 1500) { System.out.println("缴纳:" + other*0.03); }else if (other <= 4500){ System.out.println("缴纳:" + other*0.1); }else if (other <= 9000){ System.out.println("缴纳:" + other*0.2); }else if (other <= 35000){ System.out.println("缴纳:" + other*0.25); }else if (other <= 55000){ System.out.println("缴纳:" + other*0.3); }else if (other <= 80000){ System.out.println("缴纳:" + other*0.35); }else { System.out.println("缴纳:" + other*0.45); } } } }
00分享举报