//WAP TO CALCULATE THE GROSS SALRAY
#include
#include
void main()
{
float bs,hra,da,gs;
clrscr();
printf("ENTER THE BASIC SALARY=Rs");
scanf("%f",&bs);
if (bs<1500)
{
hra=(0.10)*bs;
da=(0.90)*bs;
}
else
{
hra=500;
da=0.98*bs;
}
gs=bs+da+hra;
printf("\n\nHRA=Rs%f",hra);
printf("\n\nDA=Rs%f",da);
printf("\n\nGROSS SALARY=Rs%f",gs);
getch();
}
/******OUTPUT******
ENTER THE BASIC SALARY=Rs2000
HRA=Rs500.000000
DA=Rs1960.000000
GROSS SALARY=Rs4460.000000
*/
No comments:
Post a Comment