Design an algorithm to read a value from the keyboard which represents the category of a taxpayer. Allowed categories are employed, student, and pensioners – persons over 65yrs; any other category should result in an error message being displayed. If the user enters employed, then they should be asked to be indicated if they are being paid minimum wage or more than minimum wage. For students, only persons older than 18 pay taxes.
For each taxpayer accepted, income tax payable is to be calculated and displayed. Minimum wage earners pay a flat tax amount of $500 per week, students pay 15% of their weekly gross, non-minimum wage earners pay 25% of their weekly gross and pensioners pay 10% of their weekly gross. The program should prompt the user for their weekly gross salary and calculate and display the tax, along with the gross.
Draw the flowchart and write the pseudocode for the algorithm. Implement the algorithm in C++.
Comments
Leave a comment