title: While Loop when to use OR or AND?
body: <p>I need help with this simple question.</p>
  <p>I'm starting to learn more about while loops and I'm not sure what I'm doing wrong.</p>
  <p>Here's a snippet of the code that I'm working on, so when I'm using <code>or</code> in  while loop the loop executes indefinitely. But when I use <code>AND</code> the loop stops can somebody please explain? Shouldn't <code>OR</code> be used instead as per definition?</p>
  <pre><code>void displayMenu() {
      char option;
      while (option != 'Q' or 'q') { //And or OR?
          cout &lt;&lt; &quot;P - Print numbers&quot; &lt;&lt; endl;
          cout &lt;&lt; &quot;A - Add a number&quot; &lt;&lt; endl;
          cout &lt;&lt; &quot;M - Display mean of the numbers&quot; &lt;&lt; endl;
          cout &lt;&lt; &quot;S - Display the smallest number&quot; &lt;&lt; endl;
          cout &lt;&lt; &quot;L - Display the largest number&quot; &lt;&lt; endl;
          cout &lt;&lt; &quot;Q- Quit&quot; &lt;&lt; endl;
          cout &lt;&lt; &quot;Choose Your Option-&quot; &lt;&lt; endl;
          cin &gt;&gt; option;
          if (option == 'P' or 'p')
              Print();
      }
  }
  </code></pre>