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




16 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. 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
  12. I am very much pleased with the contents you have mentioned. I wanted to thank you for this great article. unique business names

    ReplyDelete
  13. 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
  14. 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
  15. 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

Donate

Download App and Learn when ever you want

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