what's the error in this c++ code
<p>my friend wrote a c++ code, it's not working, and he came to me for help. the problem is that i don't know c++ :) i'm more interested in python and i don't want to learn c++ anytime soon, so i come here for help :) here's the code</p>

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

using namespace std;

int main (){
    char a ;
    cin &gt;&gt; a ;
    switch (a) {
    case '+' :
        int x , y , result ;

        cout &lt;&lt; "Enter A number &gt;&gt; " ;
        cin &gt;&gt; x ;
        cout &lt;&lt; endl ;

        cout &lt;&lt; "Enter A number &gt;&gt; " ;
        cin &gt;&gt; y ;
        cout &lt;&lt; endl ;

        result = x+y ;

        cout &lt;&lt; "The Answer Is &gt;&gt; " &lt;&lt; result &lt;&lt; endl ;
        break ;
    case '-' :
        int x , y , result ;

        cout &lt;&lt; "Enter A number &gt;&gt; " ;
        cin &gt;&gt; x ;
        cout &lt;&lt; endl ;

        cout &lt;&lt; "Enter A number &gt;&gt; " ;
        cin &gt;&gt; y ;
        cout &lt;&lt; endl ;

        result= x-y ;

        cout &lt;&lt; "The Answer Is &gt;&gt; " &lt;&lt; result &lt;&lt; endl ;
        break ;
    default :
        cout &lt;&lt; "Please choose the right operaions !" &lt;&lt; endl ;
    }
    return 0 ;
}
</code></pre>
