#include <stdio.h> int main ( ) { float salary,tax=0,afterTaxIncome=0,i; int t; printf("请输入您本月的收入总额(元):"); scanf("%f", &salary); i=salary-3500; { if(i<=0) t=0; else if(i<=1500) t=1; else if(i>1500 && i<=4500) t=2; else if(i>4500 && i<=9000) t=3; else if(i>9000 && i<=35000) t=4; else if(i>35000 && i<=55000) t=5; else if(i>55000 && i<=80000) t=6; else if(i<80000) t=7; } switch(t) { case 1:printf("tax=(s-3500)*0.03 TaxIncome=s-tax\n"); break; case 2:printf("tax=(s-3500)*0.1 TaxIncome=s-tax\n");break; case 3: printf("tax=(s-3500)*0.2 TaxIncome=s-tax\n");break; case 4:printf("tax=(s-3500)*0.25 TaxIncome=s-tax\n"); break; case 5:printf("tax=(s-3500)*0.3 TaxIncome=s-tax\n");break; case 6: printf("tax=(s-3500)*0.35 TaxIncome=s-tax\n");break; default:printf("tax=(s-3500)*0.45 TaxIncome=s-tax\n");break; } afterTaxIncome=salary-tax; printf("您本月应缴个人所和税 %.2f 元,税后收入是 %.2f 元。\n", tax, afterTaxIncome); return 0; }