programs
Logical Operators instead of if-else HW
Logical Operators
• In class we explored two cases where we could use logical operators/structures (logical vectors) to handle
• The logical vectors would “turn on” (return a “1”) under some conditions and “turn off” for others.
• These programs are included to help you model things for this project
Objectives • Solve the following problem statement with if-else ladders
• Solve the same problem statement again with logical vectors (structures) instead (INSTEAD) of if-else ladders
• Test each case by displaying the correct values for the following incomes: $5,000, $10,000, $11,000, $15,000, $30,000 and $100,000
(your income after graduation)
• Publish your results as a PDF
Problem Statement
• The IRS has a tax table given as …
• Taxable Income $10,000 or less …. tax is 10% of taxable income
• Taxable income between $10,000 and $20,000 … $1,000 + 20% of the amount by which the taxable income exceeds $10,000
• Taxable income more than $20,000 … $3,000 + 50% of the amount by which the taxable income exceeds $20,000