Write the algorithm using pseudocode. Create a data description table called Input-Output (IO) table. Draw an Input Processing Output (IPO) table, indicating the variables used. Test the algorithm using correct and incorrect data. To do that, you must use the trace table.
Thorn in your Salary: You have just graduated and now have a wonderful job. But surprise, surprise there is tax. The tax payable on your salary is calculated as follows:
If the salary is less than R15 000, no tax is paid. If the salary is between R15 000 and R45 000, tax paid is 20% of the salary. If the salary is more than R45000, tax is R10000 plus 25% of the amount over R45 000. If the tax paid is more than R20000, the program should print the message "You are paying a lot of tax".
The salary is read from the keyboard and the corresponding tax paid should be displayed on the screen. The algorithm should validate the input before anything is processed or calculated. The algorithm should display a message if the input read is incorrect.