A company sales employees year-end awards in accordance with the employee s total sales commission, annual sales of more than 10,000 yuan before the commission, the excess royalty percentage is as follows:

A company sales employees year-end awards in accordance with the employee s total sales commission, annual sales of more than 10,000 yuan before the commission, the excess royalty percentage is as follows:
    10,000 <s <10 million (including 10 million) commission of 7%  
    100,000 <s <50 million (including 500,000 yuan)% commission. 6
    S> 500,000 yuan (including 500,000 yuan) commission 5%
Note: excess refers to the excess of one with respect to the preceding stage, such as a annual sales of sales of $ 0.7 million, 10,000 yuan commission is not discharged, and the remaining 690,000 yuan bonus calculated as such: 100,000 yuan by 7% commission, 500,000 yuan by 6% commission, 90,000 yuan by 5 % commission.
Programming: calculate year-end awards in accordance with its annual sales of s employees.

#include "stdio.h"
main()
{
float s,k,sum;
printf("please input your number(万元):\n");
scanf("%f",&s);
s--;
if (s<1) k=s;
else if (1<=s && s<=10) k=s*1.07;
else if(10<s && s<=60) k=10*1.07+(s-10)*1.06;
else if(60<s) k=10*1.07+50*1.06+(s-60)*1.05;
k++;
printf("reward:%f万元\n",k);
}

Guess you like

Origin www.cnblogs.com/bobotongxue/p/12290677.html