软件作用,计算个人所得税及扣税后个人收入,如图
软件及源码下载链接
https://files.cnblogs.com/ruiy/ratepaying.tar.zip
包括软件源码及可执行文件,可执行文件仅仅支持在linux系统下运行请自行注意!.
code如下:
1 #if false
2 &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
3 && **::comment contents**.
4 **
5 ** C program modules files read from ./modules.c
6 ** Create by Qrrui on 2013-10-17.
7 ** QQ:516059158
8 ** person page http://cnblogs.com/ruiy
9 **
10 &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
11 #endif
12
13 #include <stdio.h>
14
15 int main(int argc,const char *argv[],const char **env[]){
16 printf("\t******************************\n");
17 printf("\t\t 个人所得税计算系统\n");
18 printf("\t\t\t 软件创建版本V1.1.0 by Qrui ,秦瑞,it圈交友QQ:516059158");
19 printf("\t******************************\n");
20
21 printf("请输入你的月工资(以元为单位):");
22 double earnnum = 0;
23 scanf("%lf",&earnnum);
24 printf("请输入当地的个税起征点(如果不知道Please Google!):");
25 double taxstart = 0;
26 scanf("%lf",&taxstart);
27 double taxnum = earnnum - taxstart;
28
29 double tax = 0.0;
30 if (taxnum > 0 && taxnum <= 500){
31 tax = taxnum * 0.05;
32 }
33 else if (taxnum > 500 && taxnum <= 2000){
34 tax = taxnum * 0.1 - 25;
35 }
36 else if (taxnum > 2000 && taxnum <= 5000){
37 tax = taxnum * 0.15 - 125;
38 }
39 else if (taxnum > 5000 && taxnum <= 20000){
40 tax = taxnum * 0.2 - 375;
41 }
42 else if (taxnum > 20000 && taxnum <= 40000){
43 tax = taxnum *0.25 - 1375;
44 }
45 else if (taxnum > 40000 && taxnum <= 60000){
46 tax = taxnum * 0.3 - 3375;
47 }
48 else if (taxnum > 60000 && taxnum <= 80000){
49 tax = taxnum * 0.35 - 6375;
50 }
51 else if (taxnum > 80000 && taxnum <= 100000){
52 tax = taxnum * 0.4 - 10375;
53 }
54 else if (taxnum > 100000){
55 tax = taxnum * 0.45 - 15375;
56 }
57 else {
58 printf("你要努力了,小伙子!还不够起征点,交啥税啊>\n");
59 }
60 printf("您的月工资收入总共是%.2lf\n",earnnum);
61 printf("您的个人收入所得税是%.2lf\n",tax);
62 printf("您的收入扣税后所得是%.2lf,纳税建设社会主义新农村哦--BY Qrui\n",earnnum-tax);
63 }