當前位置:首頁 » 編程語言 » 繳稅c語言

繳稅c語言

發布時間: 2022-10-30 16:03:25

Ⅰ 求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語言里,用if語句編寫一個程序,題目如下

#include
main()
{
int
s;
float
gongzi;
do{
printf("請輸入工資:
");
scanf("%d",&s);
fflush(stdin);
if(s
<
1000)
{
printf("您的稅後工資為:
%d\n您無需繳稅;\n",s);
}
else
if(s
>=
1000
&&
s
<
2000)
{
gongzi
=
(float)s
*
0.95;
printf("您繳稅金額為:%f,",
(float)s
*
0.05);
printf("您的稅後工資為:
%f\n",gongzi);
}
else
if(s
>=
2000
&&
s
<
3000)
{
gongzi
=
(float)s
*
0.92;
printf("您繳稅金額為:%f,",
(float)s
*
0.08);
printf("您的稅後工資為:
%f\n",gongzi);
}
else
if(s
>=
3000
&&
s
<
5000)
{
gongzi
=
(float)s
*
0.9;
printf("您繳稅金額為:%f,",
(float)s
*
0.1);
printf("您的稅後工資為:
%f\n",gongzi);
}
else
if(s
>=
5000)
{
gongzi
=
(float)s
*
0.85;
printf("您繳稅金額為:%f,",
(float)s
*
0.15);
printf("您的稅後工資為:
%f\n",gongzi);
}
}while(s);/*輸入工資為0結束*/
}

Ⅲ C語言 求個人所得稅:3500以下不繳稅,3500-4500徵收5%,4500-6500徵收10%,6500以上徵收15%。

恕直言,你這代碼有點胡寫!

  1. 把所有類似if("4500<=a<6500")這樣的語句都改成if(4500<=a && a<6500)。

  2. 把所有類似else{if...這樣的寫法都改成else if(...){...,不然一個if下的else就太多了。

  3. 把scanf("%d",&a);改成scanf("%lf",&a);。

  4. 把printf("%d ",b);改成printf("%f ",b);。

Ⅳ 個人所得稅的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;
}

Ⅳ 編程解決征稅問題。10000元以上征%5,5000-10000征%3,1000-5000征%2,1000以下不征稅.

這個問題好沒水平,又沒說用什麼語言,好吧反正我無聊,C語言的程序如下:
#include<stdio.h>
void main(void)
{
long int income,tax;
float taxrate=0.0;
printf("請輸入收入額: ");
scanf("%d",&income);
if(income>=10000)
taxrate=0.05;
else if(income<10000&&income>=5000)
taxrate = 0.03;
else if(income<5000&&income>=1000)
taxrate = 0.02;
else if(income<1000)
taxrate = 0.0;
tax = income*taxrate;
printf("應繳稅 %d 元人民幣\n",tax);

}

Ⅵ 寫一個程序,輸入任何一個公民的月收入和五險一金,能夠計算他應繳納的個人所得稅。用C語言

假定5險一金固定是1000元,起征點是3500,程序如下:

#include <stdio.h>
int main(int argc, char *argv[])
{
float money,temp,total,t;
printf("請輸入工資收入:");
scanf("%f",&money);
t=money-3500-1000; // 全月收入總額-1000(五險一金)-3500(現階段個稅起征點)

if (t<1500)
temp=t*0.03;
else
if (t<4500)
temp=1500*0.03+(t-1500)*0.1;
else
if (t<9000)
temp=1500*0.03+3000*0.1+(t-4500)*0.2;
else
if (t<35000)
temp=1500*0.03+3000*0.1+4500*0.2+(t-9000)*0.25;
else if (t<55000)
temp=1500*0.03+3000*0.1+4500*0.2+26000*0.25+(t-35000)*0.3;
else if (t<80000)
temp=1500*0.03+3000*0.1+4500*0.2+26000*0.25+20000*0.3+(t-55000)*0.35;
else
temp=1500*0.03+3000*0.1+4500*0.2+26000*0.25+20000*0.3+25000*0.35+(t-80000)*0.45;

total=money-temp;
printf("該工資扣除%8.2f的稅收後,實際工資為:%8.2f\n",temp,total);

return 0;
}

Ⅶ 用C語言程序編一個個人所得稅的源程序,求高手解答

/*
演算法設計參考: http://ke..com/view/118.htm
演算法:{(總工資)-(三險一金)-(免徵額)}X稅率-速扣數=個人所得稅
全月應納稅所得額 稅率 速算扣除數(元)
全月應納稅額不超過1500元 3% 0
全月應納稅額超過1500元至4500元 10% 105
全月應納稅額超過4500元至9000元 20% 555
全月應納稅額超過9000元至35000元 25% 1005
全月應納稅額超過35000元至55000元 30% 2755
全月應納稅額超過55000元至80000元 35% 5505
全月應納稅額超過80000元 45% 13505
*/#include <stdio.h>int main()
{
float money;//總金額
float submoney;//不應繳稅金額
float result;//稅收
float realmoney;//應繳稅金額

scanf("%f",&money);//輸入金額
scanf("%f",&submoney);//輸入不應繳稅金額

realmoney = money - submoney - 0;

if(realmoney <= 0)
{
result = 0;
}
else if(realmoney <= 1500 )//全月應納稅額不超過1500元
{
result = realmoney*0.03;
}
else if(realmoney <= 4500 )//全月應納稅額不超過4500元
{
result = realmoney*0.1-105;
}
else if(realmoney <= 9000 )//全月應納稅額不超過9000元
{
result = realmoney*0.2-555;
}
else if(realmoney <= 35000 )//全月應納稅額不超過35000元
{
result = realmoney*0.25-1005;
}
else if(realmoney <= 55000 )//全月應納稅額不超過55000元
{
result = realmoney*0.3-2755;
}
else if(realmoney <= 80000 )//全月應納稅額不超過80000元
{
result = realmoney*0.35-5505;
}
else//全月應納稅額超過80000元
{
result = realmoney*0.4-13505;
}

printf("個人所得稅為:%.2f\n",result);

return 0;
}

Ⅷ 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)
}
}

熱點內容
登陸認證失敗請檢查伺服器地址 發布:2025-05-20 07:06:55 瀏覽:831
無限分類實現php 發布:2025-05-20 06:57:40 瀏覽:681
數據結構c語言版嚴蔚敏李冬梅 發布:2025-05-20 06:55:05 瀏覽:449
iphone快捷訪問 發布:2025-05-20 06:55:05 瀏覽:928
如何加密硬碟分區 發布:2025-05-20 06:52:29 瀏覽:362
反編譯gd 發布:2025-05-20 06:52:23 瀏覽:838
java源碼知乎 發布:2025-05-20 06:47:59 瀏覽:482
dos解壓縮命令 發布:2025-05-20 06:47:57 瀏覽:638
安卓傳數據給蘋果的軟體叫什麼 發布:2025-05-20 06:42:48 瀏覽:803
怎麼樣盤解壓力 發布:2025-05-20 06:37:08 瀏覽:84