Question: in c++ language Write a program that takes as input your gross salary and your total saving and uses another function named taxCalculator() to calculate

in c++ language

Write a program that takes as input your gross salary and your total saving and uses another function named taxCalculator() to calculate your tax. The taxCalculator() function takes as parameters the gross salary as well as the total savings amount. The tax is calculated as follows:

(a) The savings is deducted from the gross income to calculate the taxable income. Maximum deduction of savings can be $20,000, even though the amount can be more than this.

(b) For up to $50,000 as taxable income the tax is 0 (Slab 0); beyond $50,000 to 80,000 tax is 3% of the difference above $50,000 (Slab 1); beyond $80,000 up to 100,000 (Slab2)the net tax is the tax calculated from Slab 0 and Slab 1 and then 5% of (Slab 2); if its more than $100,000, then the tax is tax from Slab 0, Slab 1, Slab 2 and 10% of the amount exceeding $100,000.


Test your program and display your calculated using all the possible scenarios.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!