当前位置:首页 » 编程语言 » c语言计算个人所得税

c语言计算个人所得税

发布时间: 2025-01-22 11:28:49

⑴ 用c语言编程,个人所得税计算器

可不可以把
#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'));
}
邮箱给我啊

⑵ c语言编写程序,输入月薪数a,计算并输出税率、应缴税款和实得奖金数。工薪所得扣除标

#include <stdio.h>
main()
{
int grade;
float salary,real_salary,ratal,tax;
printf("请输入个人工资薪金所得:\n ");
scanf("%f", &salary);
if(salary<0)
{
printf("输入的数据错误\n");
ratal=0;
tax=0;
}
else if(salary<=2000)
{
ratal=0;
tax=0;
}
else
ratal=salary-2000;
if(ratal<=500)
grade=1;
if(ratal>500 && ratal<=2000)
grade=2;
if(ratal>2000 && ratal<=5000)
grade=3;
if(ratal>5000 && ratal<=20000)
grade=4;
if(ratal>20000 && ratal<=40000)
grade=5;
if(ratal>40000 && ratal<=60000)
grade=6;
if(ratal>60000 && ratal<=80000)
grade=7;
if(ratal>80000 && ratal<=100000)
grade=8;
switch (grade)
{
case 1:tax=ratal*0.05-0;break;
case 2:tax=ratal*0.1-25;break;
case 3:tax=ratal*0.15-125;break;
case 4:tax=ratal*0.2-375;break;
case 5:tax=ratal*0.25-1375;break;
case 6:tax=ratal*0.3-3375;break;
case 7:tax=ratal*0.35-6375;break;
case 8:tax=ratal*0.4-10375;break;
default: tax=ratal*0.45-15375;
}
real_salary=salary-tax;
printf("应纳税额: %.2f元\n",tax);
printf("税后月收入: %.2f元\n",real_salary);
}

⑶ 求c语言解答 个人工资所得税的计算:超过基准1600元以上的要纳税,超出基准的部分按下面的标准分段纳税:

#include <stdio.h>

double CaculateTax(int income,int pos)
{
double tax = 0.0;
int temp = income - pos;
if (temp <= 0)
tax = 0.0;
else if (temp <= 500)
tax = temp * 0.05;
else if (temp <= 2000)
tax = 500 * 0.05 + (temp - 500) * 0.1;
else if (temp <= 5000)
tax = 500 * 0.05 + 1500 * 0.1 + (temp - 2000) * 0.15;
else if (temp <= 20000)
tax = 500 * 0.05 + 1500 * 0.1 + 3000 * 0.15 + (temp - 5000) * 0.20;

return tax;
}

void main()
{
int income = 0;
int pos = 1600;
double tax = 0.0;
do
{
printf("Plean input your income : ");
scanf("%d", &income);
}while(income<0 || income > 20000);
tax = CaculateTax(income, pos);
printf("%lf\n", tax);
}

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

#include <stdio.h>
#include <stdlib.h>
int jishu(double x)
{
if(0<x&&x<=500)
return 1;
else if(500<x&&x<=2000)
return 2;
else if(2000<x&&x<=5000)
return 3;
else if(5000<x&&x<=20000)
return 4;
else if(20000<x&&x<=40000)
return 5;
else if(40000<x&&x<=60000)
return 6;
else if(60000<x&&x<=80000)
return 7;
else if(80000<x&&x<=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("您不用交税 ");
else
{
n=l-3500.0;
i=jishu(n);
m=n*rate[i]-a[i];
printf("应缴个人所得税:%.2lf 实发工资额:%.2lf ",m,l-m);
}
}

这是按你说的计算方法

热点内容
老牛脚本 发布:2025-01-22 13:32:08 浏览:283
pythondatetimestr 发布:2025-01-22 13:31:20 浏览:435
彩虹岛大厦脚本130 发布:2025-01-22 13:18:39 浏览:500
龙之谷手游免费脚本 发布:2025-01-22 13:10:09 浏览:836
最近很火的奶奶解压密码 发布:2025-01-22 13:10:02 浏览:416
安卓手机硬件怎么升级 发布:2025-01-22 12:55:25 浏览:221
可编程脉冲电源 发布:2025-01-22 12:49:22 浏览:830
欧规墨规美规中东哪个配置高 发布:2025-01-22 12:48:00 浏览:778
安卓机怎么用不了多久 发布:2025-01-22 12:47:44 浏览:762
安卓怎么录屏别人直播 发布:2025-01-22 12:35:20 浏览:386