标签:style blog color os ar java sp div log
1 package myjava; 2 3 import java.util.Scanner; 4 5 public class Housework1 { 6 public static void main(String[] args) { 7 Scanner sc=new Scanner(System.in); 8 System.out.println("工资收入为:"); 9 double a=sc.nextDouble(); 10 System.out.println("五险一金为:"); 11 double b=sc.nextDouble(); 12 if(a-b-3500<=0){ 13 System.out.print("个人所得税为0"); 14 } 15 else if(a-b-3500>0&&a-b-3500<=1500){ 16 System.out.printf("个人所得税为:%f",(a-b-3500)*0.03); 17 } 18 else if(a-b-3500>1500&&a-b-3500<=4500){ 19 System.out.printf("个人所得税为:%f",(a-b-3500)*0.1-105); 20 } 21 else if(a-b-3500>4500&a-b-3500<=9000){ 22 System.out.printf("个人所得税为:%f",(a-b-3500)*0.2-555); 23 } 24 else if(a-b-3500>9000&a-b-3500<=35000){ 25 System.out.printf("个人所得税为:%f",(a-b-3500)*0.25-1005); 26 } 27 else if(a-b-3500>35000&&a-b-3500<=55000){ 28 System.out.printf("个人所得税为:%f",(a-b-3500)*0.3-2755); 29 } 30 else if(a-b-3500>55000&&a-b-3500<=80000){ 31 System.out.printf("个人所得税为:%f",(a-b-3500)*0.35-5505); 32 } 33 else if(a-b-3500>80000){ 34 System.out.printf("个人所得税为:%f",(a-b-3500)*0.45-13505); 35 } 36 sc.close(); 37 } 38 39 40 }
通过此程序可以运算出个人所得税。
标签:style blog color os ar java sp div log
原文地址:http://www.cnblogs.com/shuangyue/p/4027290.html