Refer to the insert (opens in a new tab) for the list of pseudocode functions and operators.
A program will calculate the tax payable based on the cost of an item.
Calculations will occur at many places in the program and these involve the use of one of three tax rates.
Tax rate values represent a percentage. For example, a tax rate value of 5.23 represents 5.23%. In this case, the tax payable on an item costing $100 would be $5.23.
Tax rate values are used at several places within the program. One example is given in pseudocode as follows:
HighRate FALSE CASE OF ItemCost <= 50 : TaxRate 3.75 // tax rate of 3.75% <= 200 : TaxRate 5.23 // tax rate of 5.23% > 200 : TaxRate 6.25 // tax rate of 6.25% HighRate TRUE ENDCASE TaxPayable ItemCost * TaxRate // tax payable
Give the appropriate data type for the variables in the following table, as used in the pseudocode:
Variable name | Data type |
| |
|
Was this exam question helpful?
