简单的个人所得税计算
#include
float CountTax(int , int );
int main(int argc, int *argv[]){
int Wages,SanJin;
if(argc != 3){
printf("please input 2 arguments!\n");
return 1;
}
else{
Wages=atoi(argv[1]);
SanJin=atoi(argv[2]);
printf("The Tax is %f\n",CountTax(Wages,SanJin));
return 0;
}
}
float CountTax(int a,int b){
int reman;
float temp;
reman=a-3500-b;
if(reman < 0)
return 0;
else if(reman < 1500)
temp = reman*3/100;
else if(reman < 4500)
temp = reman *10/100 - 105;
else if(reman < 9000)
temp = reman *20/100 - 555;
else if(reman < 35000)
temp = reman *25/100 - 1005;
else if(reman < 55000)
temp = reman *30/100 - 2755;
else if(reman < 80000)
temp = reman *35/100 - 5505;
else
temp = reman *45/100 - 13505;
return temp;
}
阅读(846) | 评论(0) | 转发(0) |