title: Why is Switch Statement skipped?
body: <p>I want to learn why the switch statement is skipped in my code?
  The Compiler just not read the data in the switch statement and returning 0.
  I must be doing something wrong but can't point the mistake if it is a reason!</p>
  <blockquote>
  <p>Code:</p>
  </blockquote>
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  void mainMenu();
  void ResultUsr(int);
  
  int main()
  {
      int userChoice;
      int ResultUsrInput;
  
      mainMenu();
  
      cout &lt;&lt; &quot;Choice: &quot;;
      cin &gt;&gt; userChoice;
  
      ResultUsr(ResultUsrInput);
      return 0;
  }
  void mainMenu()
  {
      cout &lt;&lt; &quot;Enter your Choice for calculation&quot; &lt;&lt; '\n';
      cout &lt;&lt; &quot;1 for Addition&quot; &lt;&lt; '\n';
      cout &lt;&lt; &quot;2 for Subtraction&quot; &lt;&lt; '\n';
  }
  void ResultUsr (int ResultUsrInput)
  {
      int value1, value2;
      switch (ResultUsrInput)
      {
      case 1:
          cout &lt;&lt; &quot;Enter Your first Value: &quot;; cin &gt;&gt; value1;
          cout &lt;&lt; &quot;Enter Your Second Value: &quot;; cin &gt;&gt; value2;
          cout &lt;&lt; &quot;The result for the Entered values [&quot; &lt;&lt; value1 &lt;&lt; &quot;] and [&quot; &lt;&lt; value2 &lt;&lt; &quot;] is equal to [&quot; &lt;&lt; value1 + value2 &lt;&lt; &quot;]&quot; &lt;&lt; '\n';
          break;
      case 2:
          cout &lt;&lt; &quot;Enter Your first Value: &quot;; cin &gt;&gt; value1;
          cout &lt;&lt; &quot;Enter Your Second Value: &quot;; cin &gt;&gt; value2;
          cout &lt;&lt; &quot;The result for the Entered values [&quot; &lt;&lt; value1 &lt;&lt; &quot;] and [&quot; &lt;&lt; value2 &lt;&lt; &quot;] is equal to [&quot; &lt;&lt; value1 - value2 &lt;&lt; &quot;]&quot; &lt;&lt; '\n';
          break;
      }
  }
  </code></pre>