Monday, October 26, 2020

If work experience is greater than 5 then bonus 50% otherwise 25%

 #include <stdio.h>

int main() 

{

    float s,e;

    printf("Enter salary & work experience:");

    scanf("%f %f",&s,&e);

    if(e>=5)

    {

        printf("Net Salary=%.2f",s*1.5);

    }

    else

    {

        printf("Net Salary=%.2f",s*1.25);

    }

}

No comments:

Post a Comment

How to Fight Overthinking or Negative Thoughts?

How to Combat Overthinking or Negative Thoughts? 1. Don’t Fight Your Thoughts Trying to suppress or control negative thoughts often backfire...