write a program in java to input name and basic salary of an employee. Calculate and display the gross salary and net salary when : da = 75% of basic, hra = 2% of basic,Medical allowance= 10% of basic,pf = 12% of basic, gross= basic+ da+ hra, net pay = gross - pf
Answers
Answered by
4
Input basic salary of employee. Store it in some variable say basic_salary.
If basic_salary <= 10000 then, hra = basic_salary * 0.8 and da = basic_salary * 0.2.
Similarly check basic salary and compute hra and da accordingly.
Calculate final gross salary using formula gross_salary = basic_salary + da + hra.
Attachments:
Similar questions