Switch Statement Switch is a second type of conditional control statement (the first being if statements) A switch statement tests for equality between a single expression and multiple cases. It is more restrictive than if statements since it can only be used to test for equality, however it is often easier to read and debug than many if and elseif statements. Tests equality between scalars using == and tests equality between strings using strcmp (case sensitive). General syntax: switch expression case value1 statements1 case value2 statements2 case value3 statements3 otherwise statements4 end How switch works: Compares each case in order and tests if expression is equal to the value of the case. First switch tests if expression and value1 are equal. If they are, execute statements1. If that test fails, tests if expression and value2 are equal. If they are, execute statements2. If that test fails, tests if expression and value3 are equal. If they are, execute statements3. And so on, until otherwise. If none of the previous values have been equal to expression, execute statements4. Can have any number of cases but only one otherwise. Otherwise is not required. Can enclose multiple choices in a value by using {}. Example: Rock, Paper, Scissors revisited. Example: User input.