Discuss the if-else statement and the switch statement. Then answer the following questions related to these two
Fantastic news! We've Found the answer you've been seeking!
Question:
Discuss the if-else statement and the switch statement. Then answer the following questions related to these two statements. Please upload pictures of the compiler showing your work.
- Why might a programmer choose one of these two types of statements over the other? When is one better than the other?
- How might either of these statements be coded incorrectly, giving unexpected results?
- List any messages your compiler gives when an if-else or switch statement has an error within it.
- Discuss the style of coding these statements, i.e., indentation, placement of curly braces, etc.
Related Book For
Fundamental Accounting Principles
ISBN: 978-0078110870
20th Edition
Authors: John J. Wild, Ken W. Shaw, Barbara Chiappetta
Posted Date: