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

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter10: Classes And Data Abstraction
Section: Chapter Questions
Problem 19PE
icon
Related questions
Question

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

Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Time complexity
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning