import java.util.Scanner;
public class TestGeRenSuoDeShui {
public static void main(String[] args){
System.out.println("个人所得税计算器小程序");
System.out.println("exit结束程序,next计算下一个");
Scanner s=new Scanner(System.in);
while(true){
System.out.println("请输入您的月薪:");
double a=s.nextDouble();
double b=0;
double c=a-5000;
System.out.println("请输入命令next或exit"+"继续执行请输入其他任意字符!");
s.nextLine();
String aa=s.nextLine();
if(aa.equals("next")){
continue ;
}
if(aa.equals("exit")){
System.out.println("退出软件,谢谢使用");
break;
}
if (a<=5000) {
System.out.println("您的月薪不超过5000,不需要交税!!!");
}else if (a<=36000&&a>5000) {
b=(c*0.03)-0;
}else if(a>36000&&a<=140000){
b=(c*0.1)-210;
}else if (a>140000&&a<=300000){
b=(c*0.2)-1140;
}else if (a>300000&&a<=420000){
b=(c*0.25)-2660;
}else if (a>420000&&a<=660000){
b=(c*0.3)-4410;
}else if (a>660000&&a<=920000){
b=(c*0.35)-7160;
}else {
b=(c*0.45)-15160;
}
double cc=a-b;
System.out.println("实发工资为"+cc+"\t"+"您的应纳税额度为"+c+"\t"+"您应交的个人所得税为"+b);
}
}
}