import java.util.Scanner;
public class Test05homework {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.print("请输入您的税前工资总额^_^:");
double money = sc.nextDouble();
System.out.print("请输入您坐在地的五险一金扣款额:");
double five = sc.nextDouble();
double end;
int lev;
double need = money - five - 3500;
if (money > 0 && five > 0 && money - five > 0) {
if (need <= 0) {
end = 0;
lev = 0;
}
else if (need <= 1500) {
end = need * 0.03 - 0;
lev = 1;
}
else if (need <= 4500) {
end = need * 0.1 - 105;
lev = 2;
}
else if (need <= 9000) {
end = need * 0.2 - 555;
lev = 3;
}
else if (need <= 35000) {
end = need * 0.25 - 1005;
lev = 4;
}
else if (need <= 55000) {
end = need * 0.3 - 2755;
lev = 5;
}
else if (need <= 80000) {
end = need * 0.35 - 5505;
lev = 6;
}
else {
end = need * 0.45 - 13505;
lev = 7;
}
System.out.printf("您的应缴税工资等级为%d,您的应缴税工资额为%.2f元~", lev, end);
}
else {
System.out.println("您输入的金额不太对哦~ 亲~");
}
sc.close();
}
}