title: I can't understand why this code give me wrong results for multiplication ,division and subtraction?
body: <p>I can't understand why this code give me wrong results for multiplication ,division and subtraction??
  where it give me the result of any multiplication operation is zero and result of any division error  finally results of subtraction always is 1 </p>
  
  <pre><code>
  #include &lt;stdio.h&gt;
  long operations(char x,int num1 ,int num2 );
  
  int main(void) {
      char x;
      int num1 , num2;
      long result;
      setbuf(stdout,NULL);
      result=operations(x,num1 ,num2 );
  
  }
  long operations(char x,int num1 ,int num2 )
  {
      printf("please enter your operation sum (1) ,subtrcation(2),mul(3),div(4) :");
      scanf("%d",&amp;x);
  
      if (x==(1||2||3||4))
      {
      printf("please enter the first and second numbers : \n ");
      scanf ("%d%d" ,&amp;num1 ,&amp;num2);
      }
      else
      {
          printf("error ") ;
      }
  
      switch (x)
      {
      case 1:
      {
          return  printf("the result  sum is  :%d ",(num1+num2)) ;
  
      }
      case 2:
      {
          return  printf("the result of subtraction  is :%d ",(num1-num2)) ;
  
      }
      case 3:
          {
              return  printf("the result multiblication is :%d ",(num1*num2)) ;
  
          }
      case 4:
          {
              return  printf("the result division  is :%d ",(num1/num2)) ;
  
          }
  
  
  
  
      }
  }
  </code></pre>