title: Why is my c != 'o' || c != 'x' condition always true?
body: <p>I have this loop statement, which I'll express using C-like syntax (C, C++, Java, JavaScript, PHP, etc. all use similar syntax):</p>
  
  <pre><code>while (c != 'o' || c != 'x') {
      c = getANewValue();
  }
  </code></pre>
  
  <p>I want it to run until I get a <code>'o'</code> or <code>'x'</code>, but it never exits, even when <code>c</code> is <code>'o'</code> or <code>'x'</code>. Why not?</p>
  
  <p>I've also tried using <code>if</code>:</p>
  
  <pre><code>if (c != 'o' || c != 'x') {
      // Show an error saying it must be either 'o' or 'x'
  }
  </code></pre>
  
  <p>but that also always shows the error message, even when <code>c</code> is <code>'o'</code> or <code>'x'</code>. Why?</p>