title: check whether a number is prime ,even or odd using function
body: <p>i am trying to make a program that will check whether the number is odd ,even or prime.But its giving error saying"no match for 'operator>>'".
  Is their any other why I can do it? .Or can someone please  help me to find the error an solve it.</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  using namespace std;
  
  
     void cal(int a, int b,char op)
     {
         switch(op)
         {
             case'+':
             cout&lt;&lt;a&lt;&lt;"+"&lt;&lt;b&lt;&lt;"="&lt;&lt;a+b&lt;&lt;endl;
             break;
             case'-':
             cout&lt;&lt;a&lt;&lt;"-"&lt;&lt;b&lt;&lt;"="&lt;&lt;a-b&lt;&lt;endl;
             break;
             case'*':
             cout&lt;&lt;a&lt;&lt;"*"&lt;&lt;b&lt;&lt;"="&lt;&lt;a*b&lt;&lt;endl;
             break;
             case'/':
            cout&lt;&lt;a&lt;&lt;"/"&lt;&lt;b&lt;&lt;"="&lt;&lt;a/b&lt;&lt;endl;
            break;
            case'%':
            cout&lt;&lt;a&lt;&lt;"%"&lt;&lt;b&lt;&lt;"="&lt;&lt;a%b&lt;&lt;endl;
            break;
            default:
              cout&lt;&lt;"Invalid operator!"&lt;&lt;endl;
         }
  
         }
         int main()
  {
  
      int a,b;
      char op;
      cout&lt;&lt;"Enter first number,operator and a second number:"&lt;&lt;endl;
      cin&gt;&gt;a&gt;&gt;endl;
      cin&gt;&gt;b&gt;&gt;endl;
      cin&gt;&gt;op&gt;&gt;endl;
      cal(a,b,op);
  
     }
  </code></pre>