#include<stdio.h>
main()
{
float x,num[9]={0}
char i='n'
x=0
do
{
scanf ("%f",&x)
if(x<=500)
{
num[0]=x-x*0.05
printf("应得工资为%.2f",num[0])
}
else if(x<=2000)
{
num[1]=x-(num[0]+(x-500)*0.1)
printf("应得工资为%.2f",num[1])
}
else if(x<=5000)
{
num[2]=x-(num[1]+(x-2000)*0.15)
printf("应得工资为%.2f",num[2])
}
else if(x<=20000)
{
num[3]=x-(num[2]+(x-5000)*0.2)
printf("应得工资为%.2f",num[3])
}
else if(x<=40000)
{
num[4]=x-(num[3]+(x-20000)*0.25)
printf("应得灶饥工资为%.2f",num[4])
}
else if(x<=60000)
{
num[5]=x-(num[4]+(x-20000)*0.3)
printf("应得工资为%.2f",num[5])
}
else if(x<=80000)
{
num[6]=x-(num[5]+(x-20000)*0.35)
printf("应得工资为%.2f",num[6])
}
else if(x<=100000)
{
num[7]=x-(num[6]+(x-60000)*0.4)
printf("应得工资为%.2f",num[7])
}
else
{
num[8]=x-(num[7]+(x-80000)*0.45)
printf("应得工资为%.2f",num[8])
}
x=0
printf("选择是否继续执行:y or n\n")
scanf("斗芦%c",&i)
}while((i=='y')||(i=='Y'))
}
邮箱给我啊
#include<stdio.h>int main()
{double x,y,p1,p2
while(1)
{scanf("%lf",&x)
if(x<=0)break
x-=3500
if(x<弯袜=1500){p1=0.03 p2=0}
else 世闹迅if(x<=4500){p1=0.1 p2=105}
搜此 else if(x<=9000){p1=0.2 p2=555}
else if(x<=35000){p1=0.25 p2=1005}
else if(x<=55000){p1=0.3 p2=2755}
else if(x<=80000){p1=0.35 p2=5055}
else {p1=0.45 p2=13505}
y=x*p1-p2
printf("个人所得税=%.2lf\n",y)
}
return 0
}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)