头歌c语言个税计算器
时间: 2023-12-22 21:29:31 浏览: 107
c语言编写的计算器
4星 · 用户满意度95%
根据提供的引用内容,以下是一个简易版的C语言个税计算器的示例代码:
```c
#include <stdio.h>
int main() {
float salary, insurance, deductions, taxableIncome, tax;
printf("请输入月工资收入:");
scanf("%f", &salary);
printf("请输入缴纳三险一金的费用:");
scanf("%f", &insurance);
printf("请输入专项附加扣除总数:");
scanf("%f", &deductions);
taxableIncome = salary - insurance - deductions;
if (taxableIncome <= 1500) {
tax = taxableIncome * 0.03;
} else if (taxableIncome <= 4500) {
tax = taxableIncome * 0.1 - 105;
} else if (taxableIncome <= 9000) {
tax = taxableIncome * 0.2 - 555;
} else if (taxableIncome <= 35000) {
tax = taxableIncome * 0.25 - 1005;
} else if (taxableIncome <= 55000) {
tax = taxableIncome * 0.3 - 2755;
} else if (taxableIncome <= 80000) {
tax = taxableIncome * 0.35 - 5505;
} else {
tax = taxableIncome * 0.45 - 13505;
}
printf("应缴税款为:%.2f\n", tax);
return 0;
}
```
阅读全文