Summary: Multiway Decisions
This lesson summarizes the major points made in this chapter.
We'll cover the following...
We'll cover the following...
- An
ifstatement can contain otherifstatements. Together, suchifstatements are said to be nested. - When an
elseclause contains anifstatement, it often is clearer to write the clause as anelse ifclause. Such a construct is a multiwayifstatement that provides several mutually exclusive choices. - In the absence of braces, an
elseclause is paired with the nearest preceding unmatchedif. - A
switchstatement provides multiple courses of action according to the value of an expression whose data type is integer, character, enumerated, orString.