A C program to find gross salary of an employee is listed below:
void main()
{
float basic,hra,da,gross;
clrscr();
printf("\n Enter the basic salary of the employee : Rs.");
scanf("%f",&basic);
if(basic>1500)
hra=500;
da=(60.00/100.00)*basic;
}
else
{
hra=(10.00/100.00)*basic;
da=(55.00/100.00)*basic;
} gross=basic+hra+da;
printf("\n The Gross Salary is : Rs. %f",gross);
getch();
}