Question: Write a C++ function to calculate the salary for employees working in a company There are two grades of employees Grade 1 and Grade 2.
Write a C++ function to calculate the salary for employees working in a company There are two grades of employees Grade 1 and Grade 2. The user must enter the base salary and the grade of the employee. The final salary is calculated as given below. If the grade is 1, then the HRA is 12% of the base salary and car allowance is 10% of the base salary If the Grade is 2, then the HRA is 20% and the car allowance is 15% of the base salary entered . * Total salary- Base salary+ HRA + Car Allowance Function prototype is. double salarydouble sal, int grade, double &hr, double &car Allowance) which should return the calculated total salary and store HRA and car allowance in reference variables accordingly Write a main program to test the function
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
