title: C++ break statement alternative
body: <p>Sorry for the "stupid" question, I'm not familiar with C++. I have this:</p>
  
  <pre><code>for (i=0; i&lt;n; i++) {
  
      if (ar[i] == 1) {
  
          printf ("Wrong.\n");
          break;
      }
      else {
  
          printf ("Correct.\n");
          break;
      }
  }
  </code></pre>
  
  <p>How can I do this without a break <code>statement</code>? Someone suggested me to use a <code>while</code> loop. Will that work?</p>