The Switch Statement in C++
A switch statement executes statements based upon the value of a variable. It is useful to replace a series of if statements, if the if statements are all looking for an equality value. The general form of this is below: Your variable must be an integer value, and must be enclosed in parentheses. The case…