Salary | Grade |
---|---|
>=30000 | A |
20000-30000 | B |
10000-20000 | C |
<10000 | D |
#include <stdio.h>
int main()
{
int sal;
printf("Enter Salary of Employee : ");
scanf("%d",&sal);
if(sal>=30000)
{
printf("\nGrade of Employee : "A"");
}
else if(sal>=20000)
{
printf("\nGrade of Employee : "B"");
}
else if(sal>=10000)
{
printf("\nGrade of Employee : "C"");
}
else
{
printf("\nGrade of Employee : "B"");
}
return 0;
}