Monday 21 May 2012

PROGRAM TO CALCULATE SALARY OF THE EMPLOYEE INCLUDING HRA,DA


#include<stdio.h>
#include<conio.h>
void main()
{ float bs,da,hra,gsalary;
clrscr();
printf("enter the basic salary of the employee");
scanf("%f",&bs);
if(bs<1500){
hra=bs*10/100;
da=60;
}
else{
hra=bs*15/100;
da=100;
}
gsalary=bs+hra+da;
printf("your salary is %f",gsalary);
}
Output:-
Enter the basic salary of the employee 15620
your salary is 18063.000000

No comments:

Post a Comment