Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

#include<stdio.

h>

#include<conio.h>

main()

int age=0,service_age=0,salary=0;

//clrscr();

printf("Enter age,service_age and salary of an employee: ");

scanf("%d%d%d",&age,&service_age,&salary);

if((age>=60) && (service_age>=15))

salary=salary*1.5;

printf("Salary=%d",salary);

else if((age>=50) && (service_age>=10))

salary=salary*1.4;

printf("Salary=%d",salary);

else if((age>=40) && (service_age>=5))

salary=salary*1.3;

printf("Salary=%d",salary);

}
else

printf("Salary=%d",salary);

getch();

return 0;

You might also like