C语言程序设计:个人所得税计算
求一个关于个人所得税计算的C语言程序
main()
{ float income,taxincome,tax; /* 定义变量收入、应税所得、个人所得税 */
printf(“please input your income\n”);
scanf(“%f”,&income);
taxincome=income-1600;
if(taxincome<=0)
tax=0;
if(taxincome<=500)
tax=taxincome*0.05;
if(taxincome>500 && taxincome<=2000)
tax=taxincome*0.1-25;
if(taxincome>2000 && taxincome<=5000)
tax=taxincome*0.15-125;
if(taxincome>5000 && taxincome<=20000)
tax=taxincome*0.2-375;
if(taxincome>20000 && taxincome<=40000)
tax=taxincome*0.25-1375;
if(taxincome>40000 && taxincome<=60000)
tax=taxincome*0.3-3375;
if(taxincome>60000 && taxincome<=80000)
tax=taxincome*0.35-6375;
if(taxincome>80000 && taxincome<=100000)
tax=taxincome*0.4-10375;
if(taxincome>100000)
tax=taxincome*0.45-1575;
printf(“your income is:%.2f\n”,income);
printf(“your income tax is:%.2f”,tax);
}