title: How do I get multiple conditions within one while loop?
body: <p>I am using a while loop and I want to user to input r, R, p, or P. But when I add more than one condition like: </p>
  
  <pre><code>while ((userInput != "r") || (userInput != "p" || (userInput != "R") || (userInput!= "P")) {
      cout &lt;&lt; "Please enter a valid option" &lt;&lt; endl;
      cin &gt;&gt; userInput;
  }
  </code></pre>
  
  <p>my program will forever be stuck in the loop. Where as if I input it like this:</p>
  
  <pre><code>while (userInput != "r") {
      cout &lt;&lt; "Please enter a valid option" &lt;&lt; endl;
      cin &gt;&gt; userInput;
  }
  </code></pre>
  
  <p>Then my code will exit the for loop if user inputs "r"
  So why does the first block of code not work? I have no errors, which means it has to be a logical error but I do not understand. How can I get more thano ne condition in a for loop and make it work?</p>