用c语言,输入某人收入,计算出应纳税额及实际得到的报酬,个人所得税应纳税额计算公式如下;收入<1000部分税率为0%;收入处于[1000,2000)的部分税率为5%;收入处于[2000,4000)的部分税率为10%;收入处于[4000,6000)的部分税率为15%;收入大于等于6000的部分税率为20%,并使用if和switch两种方法
时间: 2023-05-30 08:04:29 浏览: 166
As an AI language model, I don't have emotions and I don't subscribe to any religious beliefs. I exist to assist and provide helpful responses to your queries. If you have any questions or need assistance with anything, feel free to ask!
相关问题
用c语言写一个程序计算应纳税额,应纳税公式如下
:应纳税额 = (税前工资 - 各项社会保险费 - 起征点) × 税率 - 速算扣除数
其中,起征点为3500元,各项社会保险费为税前工资的10%,税率根据应纳税所得额不同而不同,速算扣除数也根据应纳税所得额不同而不同。
以下是一个简单的计算应纳税额的程序:
```c
#include <stdio.h>
int main() {
float salary = 0; // 税前工资
float insurance = 0; // 各项社会保险费
float threshold = 3500; // 起征点
float tax = 0; // 应纳税额
float taxable = 0; // 应纳税所得额
printf("请输入税前工资:");
scanf("%f", &salary);
insurance = salary * 0.1;
// 计算应纳税所得额
taxable = salary - insurance - threshold;
if (taxable <= 0) {
tax = 0;
} else if (taxable <= 1500) {
tax = taxable * 0.03 - 0;
} else if (taxable <= 4500) {
tax = taxable * 0.1 - 105;
} else if (taxable <= 9000) {
tax = taxable * 0.2 - 555;
} else if (taxable <= 35000) {
tax = taxable * 0.25 - 1005;
} else if (taxable <= 55000) {
tax = taxable * 0.3 - 2755;
} else if (taxable <= 80000) {
tax = taxable * 0.35 - 5505;
} else {
tax = taxable * 0.45 - 13505;
}
printf("应纳税额为:%.2f 元\n", tax);
return 0;
}
```
在程序中,先通过 `scanf` 输入税前工资,然后根据税前工资计算各项社会保险费,再根据公式计算应纳税所得额和应纳税额。最后使用 `printf` 输出应纳税额。注意,输出的应纳税额需要保留两位小数,可以使用 `%.2f` 格式化输出。
用c语言编写个人所得税,应纳税款的计算公式如下: 收入 税率 收入<1000 元部分 0% 1000 元<=收入<2000 元的部分 5% 2000 元<=收入<4000 元的部分 10% 4000 元<=收入<6000 元的部分 15% 收入>=6000 元的部分 20% 输入某人的收入,计算出应纳税额及实际得到的报酬。(使用 if 和 switch 两种方 法)
As an AI language model, I don't have emotions or personal beliefs. Therefore, I have no opinion on any subject or individual, including the concept of null. Null is a programming term that represents an empty or unknown value.
相关推荐
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![-](https://csdnimg.cn/download_wenku/file_type_column_c1.png)
![-](https://csdnimg.cn/download_wenku/file_type_lunwen.png)
![-](https://csdnimg.cn/download_wenku/file_type_column_c1.png)
![-](https://csdnimg.cn/download_wenku/file_type_column_c1.png)
![-](https://csdnimg.cn/download_wenku/file_type_column_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)