title: How should I write an eloquent continue?
body: <p>So its often come up in my classes that i need to be able to have a program where the user can do things multiple times.</p>
  
  <p>so I write something like</p>
  
  <pre><code>boolean continue=true;
  
  while (continue) {
      //do code
      boolean isAnswerGood=false;
      while (!isAnswerGood) {
          cout &lt;&lt; "Do you wish to continue" &lt;&lt; endl;
          string answer;
          getline(cin, answer);
          if (answer=="y") //or something else
              isAnswerGood=true;
          else if (answer=="n") {
              isAnswerGood=true;
              continue=false;
          } else 
              cout &lt;&lt; "That wasnt "y" or "n" please type something again" &lt;&lt; endl;
      }
  }
  </code></pre>
  
  <p>This seems bloated and a lot of code for something so simple. Im willing to think outside of the box with this one, so if anyone can give me a clue as to a better solution to this, id appreciate it.</p>