在else if(38500<income<=58500)显示错误else without a previous if,怎么解决啊?

#include <stdio.h>

int main()

{

float income,a;

printf("请输入收入");

scanf("%f",&income);

if(income<=3500)

{

printf("个人所得税为0");

}

else if(3500<income<=5000)

{

a=0.03*(income-3500);

printf("个人所得税为%f",a);

}

else if(5000<income<=8000)

{

a=0.1*(income-3500)-105;

printf("个人所得税为%f",a);

}

else if(8000<income<=12500)

{

a=0.2*(income-3500)-555;

printf("个人所得税为%f",a);

}

else if(12500<income<=38500);

{

a=0.25*(income-3500)-1005;

printf("个人所得税为%f",a);

}

else if(38500<income<=58500)

{

a=0.3*(income-3500)-2755;

printf("个人所得税为%f",a);

}

else if(58500<income<=83500)

{

a=0.35*(income-3500)-5505;

printf("个人所得税为%f",a);

}

else

{

a=0.45*(income-3500)-13505;

printf("个人所得税为%f",a);

}

return 0;

}


qq_镜音铃_0
浏览 1525回答 0
0回答
打开App,查看更多内容
随时随地看视频慕课网APP