#include
#include
int jishu(double x)
{
if(0
return 1;
else if(500
return 2;
else if(2000
return 3;
else if(5000
return 4;
else if(20000
return 5;
else if(40000
return 6;
else if(60000
return 7;
else if(80000
return 8;
else
return 9;
}
main()
{
double rate[10]={0.0,0.05,0.1,0.15,0.2,0.25,0.3,0.35,0.4,0.45};
int a[10]={0,0,25,125,375,1375,3375,6375,10375,15375};
double n,m,l;
int i;
printf("请输入工资:");
scanf("%lf",&l);
if(l<=3500)
printf("您不用交税\n");
else
{
n=l-3500.0;
i=jishu(n);
m=n*rate[i]-a[i];
printf("应缴个人所得税:%.2lf\n实发工资额:%.2lf\n",m,l-m);
}
}
这是按你说的计算方法