Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- typedef long long LL;
- void fun(float dSalary){
- float dTax;
- float perc;
- dTax = 0;
- if (dSalary > 3500){
- if (dSalary <= 5000) perc = 0.03;
- else if (dSalary <= 8000) perc = 0.1;
- else if (dSalary <= 12500) perc = 0.2;
- else perc = 0.3;
- dTax = (dSalary - 3500) * perc;
- }
- printf("您本月应缴个人所得税%.2f元,税后收入%.2f元。", dTax, dSalary - dTax);
- }
- int main(){
- fun(35700);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement