个人所得税.c 674 B

123456789101112131415161718
  1. #include <stdio.h>
  2. int main() {
  3. int wage,deduct;
  4. scanf("%d %d",&wage,&deduct);
  5. int result = wage - deduct - 5000;
  6. if(result <= 0) return 0;
  7. else if(0 < result && result <= 3000) printf("%.2f",result * 0.03);
  8. else if(3000 < result && result <= 12000) printf("%.2f",result * 0.1 - 210);
  9. else if(12000 < result && result <= 25000) printf("%.2f",result * 0.2 - 1410);
  10. else if(25000 < result && result <= 35000) printf("%.2f",result * 0.25 - 2660);
  11. else if(35000 < result && result <= 55000) printf("%.2f",result * 0.3 - 4410);
  12. else if(55000 < result && result <= 80000) printf("%.2f",result * 0.35 - 7160);
  13. else printf("%.2f",result * 0.45 - 15160);
  14. return 0;
  15. }