PAT:分支-10. 计算个人所得税(10) AC
#include<stdio.h>
int main()
{
double x;
scanf("%lf",&x);
if(x<=1600)
printf("%.2lf\n",x*0);
else if(x<=2500)
printf("%.2lf\n",(x-1600)*0.05);
else if(x<=3500)
printf("%.2lf\n",(x-1600)*0.1);
else if(x<=4500)
printf("%.2lf\n",(x-1600)*0.15);
else
printf("%.2lf\n",(x-1600)*0.2);
return 0;
}