#include"stdio.h"
double count(int a,int b)
{
double c=a-b-3500;
if(c<=0)
c=0;
else if(c<=1500)
c=c*0.03;
else if(c<=4500)
c=c*0.1-105;
else if(c<=9000)
c=c*0.2-555;
else if(c<=35000)
c=c*0.25-1005;
else if(c<=55000)
c=c*0.3-2755;
else if(c<=80000)
c=c*0.35-5505;
else
c=c*0.45-13505;
return c;
}
void main()
{
int chose;
while(1)
{
printf("\t\t个人所得税计算器\n");
printf("1.计算个人所得税\n");
printf("2.退出\n");
printf("请输入选项(1或2):");
scanf("%d",&chose);
if(chose==2)
break;
else if(chose==1)
{
int pay,baoxian;
printf("\n输入你的月收入:");
scanf("%d",&pay);
printf("\n输入你的三险一金:");
scanf("%d",&baoxian);
printf("你的个人所得税为:%0.2f",count(pay,baoxian));
}
else
{
printf("\n\t\t>>>注意:请输入1或2<<<\n");
}
}
}