为了账号安全,请及时绑定邮箱和手机立即绑定

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

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

C
qq_镜音铃_0 2017-10-16 16:50:38
#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;}
查看完整描述

目前暂无任何回答

  • 0 回答
  • 0 关注
  • 1524 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信