Part of the processing of the data is to calculate the amount of tax which needs to be paid.
. The person's total income for the year is input to the system
. The first $500 is not taxed
. The remainder is taxed at 10%
. Either the tax to be paid is output from the system OR a message is output to say there is no tax to pay
(a) Using ''I'' to stand for the total income and ''T'' to stand for the tax to be paid, produce an algorithm which will take I as its input and then calculate the tax.
(b) Explain why ''I'' and ''T'' are unsuitable as variable names and say how they can be improved.
(c) Describe how the algorithm can be used to calculate the tax for each person in the city without it having to be rerun.
Comments
Leave a comment