WAP to input employee code, name and basic salary of an employee and calculate the following values:
HRA 40 % of basic salary
DA 10 % of basic salary
CCA 5 % of basic salary
GS Basic + HRA + DA + CCA
PF 10 % of GS
IT 10 % of GS
NS GS – (PF + IT)
Display all the values.
#include<stdio.h>
#include<conio.h>
void main()
{ float sal,gs,hra,cca,da,pf,it,ns;
printf("enter basic sal");
scanf("%f",&sal);
hra=(sal*40/100);
da=(sal*10/100);
cca=(sal*5/100);
gs=(sal+hra+da+cca);
pf=(gs*10/100);
it=(gs*10/100);
ns=(gs-(pf-it));
printf("\n ns%f",ns);
printf("\nit%f",it);
printf("\npf%f",pf);
printf("\nhra %f",hra);
printf("\n gs%f",gs);
printf("\n cca%f",cca);
printf("\n da%f",da);
getch();
}
No comments:
Post a Comment