C language calculation of bonus cases

Source: Internet
Author: User

The bonuses awarded by the Enterprise are based on the profit percentage. Profit (I) is less than or equal to 100,000 yuan, the bonus can be mentioned 10%, the profit is higher than 100,000 yuan, less than 200,000 yuan, less than 100,000 yuan part by 10% commission, higher than 100,000 yuan, Cocoa Commission 7.5%, 200,000 to 400,000, higher than 200,000 yuan of the portion, can commission 5% 400,000 to 600,000 when the portion of more than 400,000 yuan, can be a commission of 3%, 600,000 to 1 million when, higher than 600,000 yuan, can be a commission of 1.5%, more than 1 million yuan, more than 1 million yuan in the portion of 1% commission, from the keyboard input month profit I, the total number of bonuses should be issued?

1. Procedure analysis: Please use the axis to demarcation, positioning. Note that the definition needs to be defined as a growth integral type.

2. Program Source code:



long int i;

int bonus1,bonus2,bonus4,bonus6,bonus10,bonus;








 else if(i<=200000)


    else if(i<=400000)


       else if(i<=600000)


          else if(i<=1000000)






Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.