In practical life, the employees get salaries and pay taxes honestly. Sometimes, the process of drawing salaries and payment of taxes may lead to some interesting situation. Suppose, a person draws salary of Rs. 10,000 per month. A certain percentage of tax is charged on that amount, which is deducted every month. But if the salary of the person is more than Rs. 10,000 per month, then the tax rate is different. Similarly if a person is getting Rs. 20,000 per month, he/she would be charged more under a different tax rate slab. The interesting situation develops if there is an anomaly in the tax rates i.e. a person who is getting higher salary takes home lesser money as compared to the other person with less gross salary. To further elaborate it, we suppose that there is company 'C' where 100 or less than 100 persons are employed. The salaries of the employees and their tax rates are known to us. We are required to list those unlucky persons, who are getting lesser take-home salary (net salary) than their colleagues with less gross salaries but lower tax rates. Given tax brackets and given employees gross salaries, determine those employees who actually get less take-home salary than others with lower initial income. Suppose the tax deduction law states that No tax will be deducted for persons with salaries ranging from Rs. 0 to Rs. 5,000 per month or in other words tax deduction rate is 0%. 5% tax deduction will be made from the persons with salaries ranging from Rs. 5,001 to Rs. 10,000 per month. For persons with salaries ranging from Rs. 10,001 to Rs. 20,000, a 10% tax deduction rate would be employed. For persons with salaries ranging from Rs. 20,001 and higher, 15% tax deduction would be made Write a C++ code of above mentioned scenario using double dimensional arrays
In practical life, the employees get salaries and pay taxes honestly. Sometimes, the process of drawing salaries
and payment of taxes may lead to some interesting situation. Suppose, a person draws salary of Rs. 10,000 per
month. A certain percentage of tax is charged on that amount, which is deducted every month. But if the salary
of the person is more than Rs. 10,000 per month, then the tax rate is different. Similarly if a person is getting Rs.
20,000 per month, he/she would be charged more under a different tax rate slab. The interesting situation
develops if there is an anomaly in the tax rates i.e. a person who is getting higher salary takes home lesser money
as compared to the other person with less gross salary.
To further elaborate it, we suppose that there is company 'C' where 100 or less than 100
persons are employed. The salaries of the employees and their tax rates are known to us.
We are required to list those unlucky persons, who are getting lesser take-home salary
(net salary) than their colleagues with less gross salaries but lower tax rates.
Given tax brackets and given employees gross salaries, determine those employees who
actually get less take-home salary than others with lower initial income.
Suppose the tax deduction law states that
No tax will be deducted for persons with salaries ranging from Rs. 0 to Rs. 5,000 per month or in other
words tax deduction rate is 0%.
5% tax deduction will be made from the persons with salaries ranging from Rs. 5,001 to Rs. 10,000 per
month.
For persons with salaries ranging from Rs. 10,001 to Rs. 20,000, a 10% tax deduction rate would be
employed.
For persons with salaries ranging from Rs. 20,001 and higher, 15% tax deduction
would be made
Write a C++ code of above mentioned scenario using double dimensional arrays
Step by step
Solved in 3 steps with 2 images