個人所得稅c語言
⑴ c語言個人所得稅計算系統
這樣看能不能符合你的要求,說實話,分好少!不行的話可以追問
include<stdio.h>
void main()
{
double insure1=0.18; //個人承擔保險金
double insure2=0.29; //他人承擔保險金
int charge=3500; //費用扣除額
int pay=0; //基本工資
int fast=0; //速算金額
double cass=0.0; //稅率
double ratepaying=0.0; //應納稅所得額
int type; //是又個人承擔的,還是他人代付
double sum=0.0;
printf("請輸入你當月取得的工資收入:%d",pay);
scanf("%d",&pay);
printf("個人所得稅是由誰承擔?(0:自己,1:他人代付):% d",type)
scanf("%d",&type);
if(type==0)
{
ratepaying=pay-pay*insure-charge;
if(ratepaying<=1500)
{
cass=0.03;
fast=0;
}
else if(ratepaying>1500 && ratepaying<=4500)
{
cass=0.1;
fast=105;
}
else if(ratepaying<4500 && ratepaying<=9000)
{
cass=0.2;
fast=555;
}
else if(ratepaying>9000 && ratepaying<=35000)
{
cass=0.25;
fast=1005;
}
else if(ratepaying>35000 && ratepaying<=55000)
{
cass=0.3;
fast=2755;
}
else if(ratepaying>55000 && ratepaying<=80000)
{
cass=0.35;
fast=5505;
}
else
{
cass=0.45;
fast=13505;
}
sum=ratepaying*cass-fast;
printf("應納個人所得稅稅額為:%.2lf",sum)
}
else
{
ratepaying=pay-pay*insure-charge;
if(ratepaying<=1455)
{
cass=0.03;
fast=0;
}
else if(ratepaying>1455 && ratepaying<=4155)
{
cass=0.1;
fast=105;
}
else if(ratepaying<4155 && ratepaying<=7755)
{
cass=0.2;
fast=555;
}
else if(ratepaying>7755 && ratepaying<=27255)
{
cass=0.25;
fast=1005;
}
else if(ratepaying>27255 && ratepaying<=41255)
{
cass=0.3;
fast=2755;
}
else if(ratepaying>41255 && ratepaying<=57505)
{
cass=0.35;
fast=5505;
}
else
{
cass=0.45;
fast=13505;
}
sum=ratepaying*cass-fast;
printf("應納個人所得稅稅額為:%.2lf",sum)
}
}
⑵ c語言計算個人所得稅哪個地方出錯了
#include<stdio.h>
intmain()
{
floatwages=0.0,tax=0.0;
inti=0;
for(;i<3;++i)
{
scanf("%f",&wages);
tax=0.0;
if(wages>3000)
tax+=(wages-3000)/20;//5%
if(wages>5000)
tax+=(wages-5000)*3/100;//在原基礎上增加3%,即8%
if(wages>10000)
tax+=(wages-10000)/25;//在原基礎上增加4%,即12%
if(wages>15000)
tax+=(wages-15000)*2/25;//在原基礎上增加8%,即20%
printf("%.2f ",tax);
}
return0;
}
以上代碼經驗證通過並運行正確。
⑶ C語言,個人所得稅計算,求大神回答- -懸賞有點少
#include<stdio.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(iit>1500&&iit<=4500) iit = (iit*0.1 - 105);
else if(iit>4500&&iit<=9000) iit = (iit*0.2 - 555);
else if(iit>9000&&iit<=35000) iit = (iit*0.25 -1005);
else if(iit>35000&&iit<=55000) iit= (iit*0.3 -2755);
else if(iit>55000&&iit<=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語言編寫個人所得稅
代碼文本:
#include "stdio.h"
int main(int argc,char *argv[]){
double x,tax;
printf("Please enter the number salary, negative end... ");
while(scanf("%lf",&x),x>=0){
if(x>=5000)
tax=(x-5000)*0.2+4200*.03;
else if(x>=800 && x<5000)
tax=(x-800)*.03;
else
tax=0;
printf("You should pay %.2f yuan. ",tax);
}
return 0;
}
⑸ C語言程序設計題: 個人所得稅問題。
#include<stdio.h>
int main()
{float x,y;
scanf("%f",&x);
if(x<1000)y=0;
else if(x<1500)y=0.05*(x-1000);
else if(x<2000)y=500*0.05+0.1*(x-1500);
else if(x<2500)y=500*0.05+500*0.1+0.15*(x-2000);
else y=500*0.05+500*0.1+500*0.15+0.2*(x-2500);
printf("%.2f\n",y);
return 0;
}
⑹ C語言個人所得稅計算器編寫,求大神
#include"stdio.h"
double count(int a,int b)
{
double c=a-b-3500;
if(c<=0)
c=0;
else if(c<=1500)
c=c*0.03;
else if(c<=4500)
c=c*0.1-105;
else if(c<=9000)
c=c*0.2-555;
else if(c<=35000)
c=c*0.25-1005;
else if(c<=55000)
c=c*0.3-2755;
else if(c<=80000)
c=c*0.35-5505;
else
c=c*0.45-13505;
return c;
}
void main()
{
int chose;
while(1)
{
printf("\t\t個人所得稅計算器\n");
printf("1.計算個人所得稅\n");
printf("2.退出\n");
printf("請輸入選項(1或2):");
scanf("%d",&chose);
if(chose==2)
break;
else if(chose==1)
{
int pay,baoxian;
printf("\n輸入你的月收入:");
scanf("%d",&pay);
printf("\n輸入你的三險一金:");
scanf("%d",&baoxian);
printf("你的個人所得稅為:%0.2f",count(pay,baoxian));
}
else
{
printf("\n\t\t>>>注意:請輸入1或2<<<\n");
}
}
}
⑺ 個人所得稅的C語言編程
#include<stdio.h>
intmain()
{doublex,y,p1,p2;
while(1)
{scanf("%lf",&x);
if(x<=0)break;
x-=3500;
if(x<=1500){p1=0.03;p2=0;}
elseif(x<=4500){p1=0.1;p2=105;}
elseif(x<=9000){p1=0.2;p2=555;}
elseif(x<=35000){p1=0.25;p2=1005;}
elseif(x<=55000){p1=0.3;p2=2755;}
elseif(x<=80000){p1=0.35;p2=5055;}
else{p1=0.45;p2=13505;}
y=x*p1-p2;
printf("個人所得稅=%.2lf
",y);
}
return0;
}
⑻ 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);
}
}
這是按你說的計算方法
⑼ C語言個人所得稅問題
#include<stdio.h>
intmain()
{
longinti,j;
floats;//將s定義為浮點數即可
scanf("%ld",&i);
j=i-3500;
if(j<=0)
s=0;
elseif(j<=1500)
s=j*0.03;//s是int的時候會強制轉換
elseif(j<=4500)
s=j*0.1-105;
elseif(j<=9000)
s=j*0.2-555;
elseif(j<=35000)
s=j*0.25-1005;
elseif(j<=55000)
s=j*0.3-2755;
elseif(j<=80000)
s=j*0.35-5505;
else
s=j*0.45-13505;
printf("YouhaveanincomeofRMB%ld.SoyoushouldshowRMB%lf. ",i,s);
}