title: How to repeat program if user says they want to play again?
body: <p>I've created a program that asks for shoe size. If the shoe size is correct, the user will get a message that says, &quot;You are correct would you like to try again?&quot; They can either answer yes or no. If they select &quot;no&quot; the program will break and they will get another message that says, &quot;Thanks for playing!&quot;</p>
  <p>Is there a way to basically force the program to break back into the while loop if the user enters yes as an answer instead of no?</p>
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  using namespace std;
  
  int main()
  {
  
      int shoesize = 13;
      int input;
      string answer;
  
      while (input != shoesize) {
          cout &lt;&lt; &quot;Guess my shoe size!&quot;;
          cin &gt;&gt; input;
  
          if (input == shoesize) {
              cout &lt;&lt; &quot;You are correct! Thanks for Playing! Would you like to play again? \n&quot;;
              cin &gt;&gt; answer;
  
              if (answer == &quot;no&quot;) {
                  cout &lt;&lt; &quot;Thank you for playing!&quot;;
              }
          }
      }
      return 0;
  }
  </code></pre>