C语言之输入月收入,输出该月应纳税额-2019
程序员文章站
2022-07-28 22:24:53
1 #include 2 #include 3 #include 4 5 #define s1 0.03 //税率b 80000 24 #define k7 15160 //速算扣除数b >80000 25 26 void main() 27 { 28 long int a; //月收入 29 lo... ......
1 #include<stdio.h> 2 #include<stdlib.h> 3 #include<string.h> 4 5 #define s1 0.03 //税率b <= 3000 6 #define k1 0 //速算扣除数b <= 3000 7 8 #define s2 0.1 //税率3000 < b <= 12000 9 #define k2 210 //速算扣除数3000 < b <= 12000 10 11 #define s3 0.2 //税率12000 < b <= 25000 12 #define k3 1410 //速算扣除数12000 < b <= 25000 13 14 #define s4 0.25 //税率25000 < b <= 35000 15 #define k4 2660 //速算扣除数25000 < b <= 35000 16 17 #define s5 0.30 //税率35000 < b <= 55000 18 #define k5 4410 //速算扣除数35000 < b <= 55000 19 20 #define s6 0.35 //税率55000 < b <= 80000 21 #define k6 7160 //速算扣除数55000 < b <= 80000 22 23 #define s7 0.45 //税率b >80000 24 #define k7 15160 //速算扣除数b >80000 25 26 void main() 27 { 28 long int a; //月收入 29 long int b; //月应纳税所得 30 long int c; //应纳税额 31 32 33 printf("请输入您的月收入:"); 34 scanf("%d",&a); 35 36 b = a - 5000; 37 38 if(b <= 3000) 39 { 40 c = b * s1 - k1; 41 } 42 else if(3000 < b && b <= 12000) 43 { 44 c = b * s2 - k2; 45 } 46 else if(12000 < b && b <= 25000) 47 { 48 c = b * s3 - k3; 49 } 50 else if(25000 < b && b <= 35000) 51 { 52 c = b * s4 - k4; 53 } 54 else if(35000 < b && b<= 55000) 55 { 56 c = b * s5 - k5; 57 } 58 else if(55000 < b && b<= 80000) 59 { 60 c = b * s6 - k6; 61 } 62 else 63 { 64 c = b * s7 - k7; 65 } 66 67 printf("您的月应纳税额为:%d",c); 68 69 printf("\n"); 70 system("pause"); 71 return ; 72 }
上一篇: nagios飞信监控安装设置方法