title: How can I write like "x == either 1 or 2" in a programming language?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/3205065/why-do-most-programming-languages-only-have-binary-equality-comparison-operators">Why do most programming languages only have binary equality comparison operators?</a>  </p>
  </blockquote>
  
  
  
  <p>I have had a simple question for a fairly long time--since I started learning programming languages.</p>
  
  <p>I'd like to write like <strong>"if x is either 1 or 2 => TRUE (otherwise FALSE)."</strong> </p>
  
  <p>But when I write it in a programming language, say in C,</p>
  
  <pre><code>( x == 1 || x == 2 )
  </code></pre>
  
  <p>it really works but looks awkward and hard to read. I guess it should be possible to <strong>simplify</strong> such an or operation, and so if you have any idea, please tell me. Thanks, Nathan</p>