网站建设资讯

NEWS

网站建设资讯

c语言实现计税函数 c语言算税

C语言编写个人所得税?

代码文本:

网站建设公司,为您提供网站建设,网站制作,网页设计及定制网站建设服务,专注于企业网站建设,高端网页制作,对地磅秤等多个行业拥有丰富的网站建设经验的网站建设公司。专业网站设计,网站优化推广哪家好,专业成都网站营销优化,H5建站,响应式网站。

#include "stdio.h"

int main(int argc,char *argv[]){

double x,tax;

printf("Please enter the number salary, negative end...\n");

while(scanf("%lf",x),x=0){

if(x=5000)

tax=(x-5000)*0.2+4200*.03;

else if(x=800 x5000)

tax=(x-800)*.03;

else

tax=0;

printf("You should pay %.2f yuan.\n",tax);

}

return 0;

}

C语言计算个人所得税 编程

#include stdio.h

#include stdlib.h

int jishu(double x)

{

if(0xx=500)

return 1;

else if(500xx=2000)

return 2;

else if(2000xx=5000)

return 3;

else if(5000xx=20000)

return 4;

else if(20000xx=40000)

return 5;

else if(40000xx=60000)

return 6;

else if(60000xx=80000)

return 7;

else if(80000xx=100000)

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);

}

}

这是按你说的计算方法

C语言,个人所得税计算,求大神回答- -悬赏有点少

#includestdio.h

double IIT(int money,int nation)

{

double iit = money;

switch(nation)

{

case 1 : iit = money - 1000 - 3500 ;break;

case 0 : iit = money - 1000 - 4800 ;break;

default: printf("输入有误!\n");

}

if(iit =1500) iit = iit*0.03;

else if(iit1500iit=4500) iit = (iit*0.1 - 105);

else if(iit4500iit=9000) iit = (iit*0.2 - 555);

else if(iit9000iit=35000) iit = (iit*0.25 -1005);

else if(iit35000iit=55000) iit= (iit*0.3 -2755);

else if(iit55000iit=80000) iit= (iit*0.35 -5505);

else iit = (iit*0.45 - 13505);

return iit;

}

int main()

{

int money,nation;

printf("请确定你的国籍: 1.中国 0.外籍\n");

scanf("%d",nation);

printf("请输入您的工资: ");

scanf("%d",money);

if(nation == 1){

if(money = 4500)

printf("您不需要缴纳个人所得税。\n");

else

printf("您要缴纳的个人所得税为: %.0f",IIT(money,nation));

}

if(nation == 0)

{

if(money = 5800)

printf("您不需要缴纳个人所得税。\n");

else

printf("您要缴纳的个人所得税为: %.0f",IIT(money,nation));

}

return 0;

}

c语言实现计税函数

#includestdio.h

float getTax(float salary)

{

float tax;

if(salary=10000)

tax=salary*0.1;

else if(salary10000 salary=20000)

tax=10000*0.1+(salary-10000)*0.12;

else if(salary20000 salary=30000)

tax=10000*0.1+10000*0.12+(salary-20000)*0.15;

else if(salary30000 salary=40000)

tax=10000*0.1+10000*0.12+10000*0.15+(salary-30000)*0.18;

else if(salary40000)

tax=10000*0.1+10000*0.12+10000*0.15+10000*0.18+(salary-40000)*0.2;

return tax;

}

int main()

{

float salary,tax;

scanf("%f",salary);

tax=getTax(salary);

printf("tax=%f\n",tax);

return 0;

}

编写c语言程序实现税费的计算。输入一个奖金数,求应交税款及实得奖金数

#includestdio.h

int main()

{

float a ,b,c;

printf("请输入奖金数:");

scanf("%f",a);

if (a 500)

printf("应缴税款:%f\n实得奖金数:%f",a*0/100,a*100/100);

else if(a=500a1000)

printf("应缴税款:%f\n实得奖金数:%f", a * 3/ 100, a * 97 / 100);

else if(a=1000a2000)

printf("应缴税款:%f\n实得奖金数:%f", a * 5 / 100, a * 95 / 100);

else if(a=2000a5000)

printf("应缴税款:%f\n实得奖金数:%f", a * 8 / 100, a * 92 / 100);

else

printf("应缴税款:%f\n实得奖金数:%f", a * 12 / 100, a * 88 / 100);

return 0;

}

关于纳税的C语言程序

其一:

j=(x-3500)*(3%);

(3%)C语言中不能识别3%之类的、可以改为0.03

然后:

如果if后面的语句在两句或两句以上要用{}括起来

else也是


当前题目:c语言实现计税函数 c语言算税
转载来于:http://cdweb.net/article/dodeheo.html