一个关于c语言的问题,本人初学,不懂,这段程序还希望大神路过帮我看一下!
#include<stdio.h>voidmain(){floatincome,TB;intt1,t2,t3,t4;printf("个人所得税起征点为2000\n");p...
#include<stdio.h>
void main()
{float income,TB;
int t1,t2,t3,t4;
printf("个人所得税起征点为2000\n");
printf("plese input your income :\n");
scanf("%f",income);
t1=500*0.05;
t2=t1+1500*0.1;
t3=t2+3000*0.15;
t4=t3+(income-7000)*0.2;
if(income>2000&&income<=2500)
TB=(income-2000)*0.05;
else if(income>2500&&income<=4000)
TB=t1+(income-2500)*0.1;
else if(income>4000&&income<=7000)
TB=t1+t2+(income-4000)*0.15;
else if(income>7000)
TB=t4;
if(income<=2000) printf("您不用缴纳税费\n");
else
printf("you shoule pay : %5.2f",TB);
} 展开
void main()
{float income,TB;
int t1,t2,t3,t4;
printf("个人所得税起征点为2000\n");
printf("plese input your income :\n");
scanf("%f",income);
t1=500*0.05;
t2=t1+1500*0.1;
t3=t2+3000*0.15;
t4=t3+(income-7000)*0.2;
if(income>2000&&income<=2500)
TB=(income-2000)*0.05;
else if(income>2500&&income<=4000)
TB=t1+(income-2500)*0.1;
else if(income>4000&&income<=7000)
TB=t1+t2+(income-4000)*0.15;
else if(income>7000)
TB=t4;
if(income<=2000) printf("您不用缴纳税费\n");
else
printf("you shoule pay : %5.2f",TB);
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询