// A company decided to give bonus of 5% to employee if his/her year of service is more than 5 years.
// Ask user for their salary and year of service and print the net bonus amount.
#include <stdio.h>
void main()
{
int bonus,year,net,salary;
printf("enter your service period\n");
scanf("%d",&year);
if (year > 5)
{
printf("congo ur getting a bonus from our compony\n");
printf("enter your salary :");
scanf("%d",&salary);
bonus= salary*5/100;
printf("congo your getting a bonus of %d\n", bonus);
net=salary+bonus;
printf("your total salary this month is : %d",net);
}
else
{
printf("sorry you are not eligible ");
}
}
0 Comments