Question: Suppose you want to write an if statement with multiple alternatives to print out the single tax bracket that someone is in , based on
Suppose you want to write an if statement with multiple alternatives to print out the single tax bracket that someone is in based on their income. Assume the integer variable income holds the annual income. What is wrong with the following if statement?The if conditions are in the wrong order; the check for the highest bracket should be firstThe conditions should use a sequence of if elseif clauses, not just independent if statementsThe if conditions should be a switch statement insteadNothing is wrong the if statement will correctly print out the tax brackets
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
