Contact Learn C
Copy

Program 273: Program to print Company Bonus on Salary

Program 273: Program to print Company Bonus on Salary
Que:-

A company  decides to give bonus to all its employees on new year. A 5% bonus on salary is given to male workers and 10% bonus on salary is given to female workers.  write a C program to enter the salary and gender of the employees.  If the salary of the employee is less than 10000, then the employee gets an extra 2% bonus on salary.  Calculate the bonus that has to be given to the employee and display the salary that the employee will get?

#include<stdio.h>
#include<string.h>
main()
{
 int i,j;
 float salary,bonus;
 char gender;
 printf("Enter M for Male and F for Female\n");
 scanf("%c",&gender);
 printf("Enter Salary\n");
 scanf("%f",&salary);
 if(gender=='M' || gender=='m')
 {
  if(salary>10000)
  bonus=(float)(salary*0.05);//0.05--5%
  else
  bonus=(float)(salary*0.07);
 }
 if(gender=='F' || gender=='f')
 {
  if(salary>10000)
  bonus=(float)(salary*0.1);//0.1--10%
  else
  bonus=(float)(salary*0.12);
 }
 salary+=bonus;
 printf("Bonus=%.2f\nSalary=%.2f\n",bonus,salary);
}
Explanation:

//Coming Soon

Output:
Program to print Company Bonus on Salary

Program to print Company Bonus on Salary




20 comments:

  1. Can you give same answer for python

    ReplyDelete
  2. Can you give the same answer for Python

    ReplyDelete
  3. Can u give the same answer for python

    ReplyDelete
  4. before main- int is missing (3rd line)
    on compiling it is showing error

    ReplyDelete
  5. In year 4 the tempest mists started framing for Company A. The organization expected to enlist extra work force to deal with the development it had encountered and to help expected proceeded with expansions in income. Europa-Road túlméretes szállítás

    ReplyDelete
  6. Interesting post. I Have Been wondering about this issue, so thanks for posting. Pretty cool post.It 's really very nice and Useful post.Thanks company incorporation Singapore

    ReplyDelete
  7. All the contents you mentioned in post is too good and can be very useful. I will keep it in mind, thanks for sharing the information keep updating, looking forward for more posts.Thanks store names

    ReplyDelete
  8. Edges have been great and the company has had the option to disseminate money to the proprietor every year. https://www.opiniones-empresas.com

    ReplyDelete
  9. Current bank terms had set the company in a position where the credit extension was proceeding to build due to the misfortunes from tasks. The company expected to renegotiate existing bank arrangements to turn away a circumstance that could handicap the business. Finance Hunt Wandsworth HSBC UK

    ReplyDelete
  10. This is exactly the text I'm sure uncovering everywhere you look. Thanks a lot for a blog page, I just join up your website. That is the decent blog page. inches. Payment Processing Affiliate Program

    ReplyDelete
  11. Watch and Download world's famous drama series Kurulus Osman in English on link below
    👇
    Kurulus Osman in English

    📢Get high quality backlinks for your
    Website with BacklinksIndexer
    BacklinksIndexer

    Crypto trading online course
    Join on link below
    Crypto quantum leap

    📒 Read Home doctor book online
    Then you will be a doctor for your family
    Home Doctor Book

    Join online YouTube course
    And be a professional YouTuber
    Tube Mastery and Monetization by matt

    🦷Steel Bite Pro
    Best product for
    Teeth pain, cavities,teeth whitening and other oral health issues with money back guarantee
    Steel Bite Pro

    ReplyDelete
  12. Thank you for another great article. Where else could anyone get that kind of information in such a perfect way of writing? I have a presentation next week, and I am on the look for such information. webpage

    ReplyDelete
  13. I am very much pleased with the contents you have mentioned. I wanted to thank you for this great article. unique business names

    ReplyDelete
  14. Truly, this article is really one of the very best in the history of articles. I am a antique ’Article’ collector and I sometimes read some new articles if I find them interesting. And I found this one pretty fascinating and it should go into my collection. Very good work! company name suggestions

    ReplyDelete
  15. You’ve got some interesting points in this article. I would have never considered any of these if I didn’t come across this. Thanks!. creative business name

    ReplyDelete
  16. This is a truly good site post. Not too many people would actually, the way you just did. I am really impressed that there is so much information about this subject that have been uncovered and you’ve done your best, with so much class. If wanted to know more about green smoke reviews, than by all means come in and check our stuff. short business names

    ReplyDelete
  17. It is perfect time to make some plans for the future and it is time to be happy. I've read this post and if I could I desire to suggest you some interesting things or suggestions. Perhaps you could write next articles referring to this article. I want to read more things about it! creative names for companies

    ReplyDelete
  18. Wow, cool post. I’d like to write like this too – taking time and real hard work to make a great article… but I put things off too much and never seem to get started. Thanks though. unique business names

    ReplyDelete
  19. Thanks for posting this info. I just want to let you know that I just check out your site and I find it very interesting and informative. I can't wait to read lots of your posts. best startup names

    ReplyDelete

Donate

Download App and Learn when ever you want

Get it on PlayStore
Get it on Amazon App Store
Get it on Aptoide