Solved

Suppose You Want to Write an If Statement with Multiple

Question 52

Multiple Choice

Suppose you want to write an if statement with multiple alternatives to print out someone's tax bracket based on their income.Assume the integer variable income holds the annual income.What is wrong with the following if statement? Suppose you want to write an if statement with multiple alternatives to print out someone's tax bracket based on their income.Assume the integer variable income holds the annual income.What is wrong with the following if statement?    A) The conditions are in the wrong order; the check for the highest bracket should be first B) The conditions should use an if/ else if/else sequence, not just independent if statements C) The conditions should be a switch statement instead D) Nothing is wrong - the if statement will correctly print out the correct tax brackets


A) The conditions are in the wrong order; the check for the highest bracket should be first
B) The conditions should use an if/ else if/else sequence, not just independent if statements
C) The conditions should be a switch statement instead
D) Nothing is wrong - the if statement will correctly print out the correct tax brackets

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents