counter

Free Hit Counter

Simple C program to print Net salary of user




Q:Write a program to find out the net salary of an employee,get the basic salary from him.TA=5%,DA=64%,HRA=12% on his basic salary,TAX=3%,PF=12% on his gross salary




#include
#include
void main()
{
float bs,ta,da,hra,gs,tax,pf,ns;
clrscr();

printf("\tEnter basic salary:");
scanf("%f",&bs);
ta=(0.05*bs);
da=(0.64*bs);
hra=(0.12*bs);
gs=ta+da+hra+bs;
tax=(0.03*gs);
pf=(0.12*gs);
ns=gs-tax-pf;

printf("\t\tnet salary:%f\n",ns);
getche();
}

No comments:

Post a Comment