Appendix G - 1_425.0, Excess_Rate => 0.25));...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Appendix G. input = employee’s salary, tax range process = tax calculation output = total tax Tax_Table : constant array(1. .5) of Tax_Rate := ( Base) (Salary_Min => 0.0, Salary_Max => 1_499.99, Base_Tax => 0.0, Excess_Rate => 0.15), (Salary_Min => 1_500.00, Salary_Max => 2_999.99, Base_Tax => 225.0, Excess_Rate => 0.16), (Salary_Min => 3_000.00, Salary_Max => 4_999.99, Base_Tax => 465.0, Excess_Rate => 0.18), (Salary_Min => 5_000.00, Salary_Max => 7_999.99, Base_Tax => 825.0, Excess_Rate => 0.20), (Salary_Min => 8_000.00, Salary_Max => 14_999.99, Base_Tax =>
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 1_425.0, Excess_Rate => 0.25)); Input_Salary : Float; Total_Tax : Float; begin Put("Enter the salary: "); Get(Item => Input_Salary); for I in Tax_Table'range loop if Input_Salary >= Tax_Table(I).Salary_Min and Input_Salary <= Tax_Table(I).Salary_Max then Total_Tax := Tax_Table(I).Base_Tax + ((Input_Salary - Tax_Table(I).Salary_Min) * Tax_Table(I).Excess_Rate); exit; end IF; end loop; Put("Tax for salary of "); Put(Item => Input_Salary, Aft => 2, Exp => 0); Put(" is "); Put(Item => Total_Tax, Aft => 2, Exp => 0)...
View Full Document

This note was uploaded on 08/28/2011 for the course INFORMATIO IT/210 taught by Professor N/a during the Spring '11 term at ITT Tech Tucson.

Ask a homework question - tutors are online