title: What does this syntax (0 < x < 10) do in C++?
body: <p>I thought this syntax <code>0 &lt; x &lt; 10</code> equal with this syntax <code>0 &lt; x &amp;&amp; x &lt; 10</code>. However, today, my program has proven me wrong. Normally, I won't ask this kind of question, what does <code>0 &lt; x &lt; 10</code> do? But the compiler accepts it so I hope it has some kind of function.</p>
  
  <p>Here is a part of my code:</p>
  
  <pre><code>if (0 &lt;= grade &lt; 59)
          letter = 'F';
      else if (60 &lt;= grade &lt; 69)
          letter = 'D';
      else if (70 &lt;= grade &lt; 79)
          letter = 'C';
      else if (80 &lt;= grade &lt; 89)
          letter = 'B';
      else if (90 &lt;= grade &lt;= 100)
          letter = 'A';
      else
          letter = '?';
  </code></pre>
  
  <p>The result always returns <code>letter ='F'</code>, so I thought that the compiler only considers <code>0 &lt;= grade</code> as condition. But if that is how compiler works than <code>letter</code> should equal <code>?</code> when I assign char value or a negative number. However it is not. So I really confused between an error of compiler and 'function of compiler' because if it is then what does <code>0 &lt; x &lt; 10</code> do?</p>