{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

AppendixGwk3

# AppendixGwk3 - Axia College Material Appendix G Sequential...

This preview shows pages 1–3. Sign up to view the full content.

Axia College Material Appendix G Sequential and Selection Process Control Structure In the following example, the second line of the table specifies that tax due on a salary of \$2000.00 is \$225.00 plus 16% of excess salary over \$1500.00 (that is, 16% of \$500.00). Therefore, the total tax is \$225.00 + \$80.00, or \$305.00. Salary Range in Dollars Base Tax in Dollars Percentage of Excess 1. 0.00-1,499.99 0.00 15 % 2. 1,500.00-2,999.99 225.00 16 % 3. 3,000.00-4,999.99 465.00 18 % 4. 5,000.00-7,999.99 825.00 20 % 5. 8,000.00-14,999.99 1425.00 25 % Main Module Declare SalaryAmount as Integer Declare BaseTax as Integer Declare ExcessSalary as Integer Declare TotalTax as Integer Get the user input Determine Salary Find the base tax Subtract minimum salary range from input salary, multiply total salary by percentage of excess salary to find the excess amount Add the base tax to excess salary to find total tax Display total tax End Main Module Total Tax Module Write “Enter salary amount: \$SalaryAmount” Input Salary Amount If (SalaryAmount >= \$0.00) or (SalaryAmount <= \$1,499.99) Then BaseTax = \$0.00 ExcessSalary = (SalaryAmount - \$0.00)*0.15 BaseTax + ExcessSalary = TotalTax

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
End If
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}