In a firm the employee gets house rent allowance as 10% of Basic pay and the Provident fund as 8.33% of Basic pay.
Write a program in 'C' to enter the basic pay (bp), to calculate and print the house rent (hra), the provident fund (pf) and net salary is (ns).
#include< #include< main() { int bp; float hra, pf, ns; clrscr(); printf("Enter the Basic Pay\n"); scanf("%d", &bp); hra = bp*10/100; pf = bp*8.33/100; ns = bp+hra-pf; printf("The hra is Rs. %f\n", hra); printf("The pf is Rs. %f\n", pf); printf("The Net Salary is Rs. %f\n", ns); return(0); } |
---|
0 comments:
Post a Comment