C Program to calculate Salary of Employee
Get employee wages and number of days worked from user and find Basic Pay, DA, HRA, PF and Net Pay.
(Note HRA, DA and PF are 10%,5%and 12% of basicpay respectively.)
Sample Input 1:
Sample Output 1:
Net Pay: 3090
printf("Enter daily wages and number of days worked:");
printf("\nBasic:%lf \nHRA:%lf \nDA:%lf \nPF:%lf \nNet Salary:%lf",basic,HRA,DA,PF,netsalary);
Get daily wage of an employee and days worked by the employee. (using scanf statement).
Calculate Basic Pay by multiplying wages & days worked
Calculate HRA by multplying basic pay and 0.1
Calculate DA by multplying basic pay and 0.05
Calculate PF by multiplying basic pay and 0.12
Calculate Net Pay by adding HRA and DA, subracting PF with Basic Pay.
Print Basic Pay, DA, HRA, PF and Net Pay (using printf statement)