title: multiple conditions in same if statement in C
body: <p>I write code in <code>c</code> and  </p>
  
  <p>I am beginner in the case I think <code>if(a==1,b&lt;=8)</code> work like the control first check the value of <code>a</code> if and it is true then check <code>b</code>condition if both conditions are true then come into body but I think I did not know the accurate syntax to write that can anyone give me correct syntax. </p>
  
  <p>here is my code:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;cono.h&gt;
  #include &lt;iostream.h&gt;
  #include &lt;stdlib.h&gt;
  void main(void)
  {
      int a, b;
      printf("enter a");
      scanf("%d",&amp;a);
      printf("enter b");
      scanf("%d",&amp;b);
      if(a==1, b&lt;=8)
      {
          printf("you");
          exit(0);
      }
      if(a==2, 5&lt;b&lt;=10)
      {
          printf("you");
      else
          printf("me");
      }
      getch();
  }
  </code></pre>
  
  <p>Expected result example:</p>
  
  <p>If <code>a</code> is equal to 2 so control check if <code>b</code> is less than 10 and greater than 5 if it is so, control run if's true condition if not so control run else statement </p>