title: Rock-paper-scissors game c++
body: <p>Rock-paper-scissors game c++ doesn't display the cout to tell who win the game, i dont know what wrong and why is the program doesn't show the cout. Please let me know whats wrong and how to fix it and why it happened and i think the cstdlib is doing nothing there.</p>
  
  <blockquote>
    <p>Objective: To score the rock-paper-scissors game. If the user enters
    invalid input, your program should say so, otherwise it will output
    one of the above results.</p>
  </blockquote>
  
  <pre><code>#include &lt;iostream&gt; 
  #include &lt;cstdlib&gt; 
  
  using namespace std; 
  
  int main() 
  { 
      string pone; 
      string ptwo; 
      string r; 
      string p; 
      string s; 
  
      cout &lt;&lt; "Rock, Paper, Scissors Game\n"; 
      cout &lt;&lt; "\nPlayer One, please enter your move: ('p' for Paper, 'r' for Rock, 's' for Scissor)";  
  
      cin &gt;&gt; pone; 
  
      cout &lt;&lt; "\nPlayer Two, please enter your move: ('p' for Paper, 'r' for Rock, 's' for Scissor)"; 
  
      cin &gt;&gt; ptwo; 
  
      if (pone == ptwo) 
      { 
          cout &lt;&lt;"\nThere is a tie"&lt;&lt;endl; 
      } 
  
      if ( pone == r &amp;&amp; ptwo == p) 
      { 
          cout &lt;&lt; "\nPaper wraps rock, Player 1 win"; 
      } 
      else if (pone == r &amp;&amp; ptwo == s) 
      { 
          cout &lt;&lt; "\nRock smashes scissors, player 1 win"; 
      } 
  
      if (pone == p &amp;&amp; ptwo == r) 
      { 
          cout &lt;&lt;"\nPaper wraps rock, player 1 win"; 
      } 
      else if ( pone == p &amp;&amp; ptwo == s) 
      { 
          cout &lt;&lt;"\nScissors cut paper, player 2 win"; 
      } 
  
      if ( pone == r &amp;&amp; ptwo == p) 
      { 
          cout &lt;&lt; "\nPaper wraps rock, Player 1 win"; 
      } 
      else if (pone == r &amp;&amp; ptwo == s) 
      { 
          cout &lt;&lt; "\nRock smashes scissors, player 1 win"; 
      } 
  
      if (pone == p &amp;&amp; ptwo == r) 
      { 
          cout &lt;&lt;"\nPaper wraps rock, player 1 win"; 
      } 
      else if ( pone == p &amp;&amp; ptwo == s) 
      { 
          cout &lt;&lt;"\nScissors cut paper, player 2 win"; 
      } 
  
      if ( ptwo == s &amp;&amp; pone == r) 
      { 
          cout &lt;&lt;"\nScissors cut paper, player 1 win"; 
      } 
      else if (ptwo == s &amp;&amp; pone == p) 
      { 
          cout &lt;&lt;"\nRock smashes scissors, player 2 win "; 
      } 
  
      return 0; 
  }
  </code></pre>