{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Sequential and Selection Processing Control Structure

# Sequential and Selection Processing Control Structure -...

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

Sequential and Selection Processing Control Structure 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. 1 0.00-1,499.99 0.00 15 % 2. 2 1,500.00-2,999.99 225.00 16 % 3. 3 3,000.00-4,999.99 465.00 18 % 4. 4 5,000.00-7,999.99 825.00 20 % 5. 5 8,000.00-14,999.99 1425.00 25 % Write “Enter salary” Input number As Real Integer Number <> 0 If Number > 0 AND < 1500.00 Then Calculate Number Using Number * 15% Else If Number >= 1500.00 AND < 3000.00 Then Calculate Number Using Number - 1500.00 * 16% + 225.00 Else If Number >= 3000.00 AND < 5000.00 Then Calculate Number Using Number - 3000.00 * 18% + 465.00 Else If Number >= 5000.00 AND < 8000.00 Then

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

View Full Document
Calculate Number Using Number - 5000.00 * 20% + 825.00 Else If Number >= 8000.00 AND < 15000.00 Then Calculate Number Using Number - 8000.00 * 25% + 1425.00 Display Calculation As Currency End
Salary 1500.00, 1500.00 is not equal to 0, 1500.00 is not “> 0 AND < 1500.00”, 1500.00 is “>= 1500 AND < 3000.00“, Calculate number using Number – 1500.00 * 16% + 225.00

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

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

{[ snackBarMessage ]}

### Page1 / 4

Sequential and Selection Processing Control Structure -...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online