Switch in C++ hits everything? : <p><strong>First of all, I know breaks fix this issue, but I just want to make sure I understand the default behavior of a switch in C++.</strong></p>

<p>I have the following C++ code that isn't working the way I think it would coming from other languages:</p>

<pre><code>#include &lt;iostream&gt;

using namespace std;

int main(){
    int n;
    cin &gt;&gt; n;
    switch(n) {
    case 1: cout &lt;&lt; "one" &lt;&lt; endl;
    case 2: cout &lt;&lt; "two" &lt;&lt; endl;
    case 3: cout &lt;&lt; "three" &lt;&lt; endl;
    case 4: cout &lt;&lt; "four" &lt;&lt; endl;
    case 5: cout &lt;&lt; "five" &lt;&lt; endl;
    case 6: cout &lt;&lt; "six" &lt;&lt; endl;
    case 7: cout &lt;&lt; "seven" &lt;&lt; endl;
    case 8: cout &lt;&lt; "eight" &lt;&lt; endl;
    case 9: cout &lt;&lt; "nine" &lt;&lt; endl;
    default: cout &lt;&lt; "Greater than 9" &lt;&lt; endl;
    }
    // your code goes here
    return 0;
}
</code></pre>

<p>Which outputs:</p>

<pre><code>$ ./a.out 
1
one
two
three
four
five
six
seven
eight
nine
Greater than 9
</code></pre>

<p>Why are the other cases being hit?</p>

<p>Why is the default behavior different from other languages?</p>
