Skip to main content
Engineering LibreTexts

13: Multiway Selection

  • Page ID
    10323
    • 13.1: Nested If Then Else
      As you can see we simply included as part of the "true action" a statement and another if then else control structure. We did the same (nested another if then else) for the "false action". In our example we nested if then else control structures. Nesting could have an if then else within a while loop. Thus, the concept of nesting allows the mixing of the different categories of control structures.
    • 13.2: Logical Operators
      Within most languages, expressions that yield Boolean data type values are divided into two groups. One group uses the relational operators within their expressions and the other group uses logical operators within their expressions.
    • 13.3: Case Control Structure
      One of the drawbacks of two way selection is that we can only consider two choices. But what do you do if you have more than two choices.
    • 13.4: Branching Control Structures
      The branching control structures allow the flow of execution to jump to a different part of the program. The common branching control structures that are used with other control structures are: break, continue and goto. These are rarely used in modular structured programming with one exception. That exception is in relation to creating the case within the selection category of control structures.
    • 13.5: Practice 12 Multiway Selection