Write a program in c++ to calculate the net pay of an employee. Input the basic pay, pass basic pay to user defined function PayCalculate(), calculate net pay and return to main function. Calculate the net pay of an employee should be stored in a file along with its complete detail such as emp_no, emp_name, emp-designation and next time if user want to view it can easily view it. House Rent is 45% of basic pay. Medical Allowance is 5% of basic pay if pay is greater than Rs.4000, it is 7% of basic pay if basic pay is less than or equal to Rs.4000. Conveyance Allowance is Rs.200 of basic pay if pay is greater than Rs.4000, it is Rs.435 of basic pay if basic pay is less than or equal to Rs.4000. Net pay is calculated by adding house rent, medical allowance ,conveyance allowance and basic pay.
Write a program in c++ to calculate the net pay of an employee. Input the basic pay, pass basic
pay to user defined function PayCalculate(), calculate net pay and return to main function.
Calculate the net pay of an employee should be stored in a file along with its complete
detail such as emp_no, emp_name, emp-designation and next time if user want to view it
can easily view it.
House Rent is 45% of basic pay.
Medical Allowance is 5% of basic pay if pay is greater than Rs.4000, it is 7% of basic pay if
basic pay is less than or equal to Rs.4000.
Conveyance Allowance is Rs.200 of basic pay if pay is greater than Rs.4000, it is Rs.435 of
basic pay if basic pay is less than or equal to Rs.4000.
Net pay is calculated by adding house rent, medical allowance ,conveyance allowance and
basic pay.
Step by step
Solved in 2 steps with 2 images