计算销售提成工资
#include<stdio.h>
main()
{int bon=1000;
float bonus,i,bon1,bon2,bon3,bon4;
printf("请输入销售额\n");
scanf("%f",&i);
bon1=(i-10000)*0.05;
bon2=(i-20000)*0.06;
bon3=(i-50000)*0.07;
bon4=(i-100000)*0.08;
if(i<=10000)
bonus=bon;
else
if(i>10000&&i<=20000)
bonus=bon+bon1;
else
if(i>20000&&i<=50000)
bonus=bon+bon2;
else
if(i>50000&&i<=100000)
bonus=bon+bon3;
else
if(i>100000)
bonus=bon+bon4;
printf("%.3f\n",bonus);
}