title: Why do { } while(condition); needs semicolon at the end of it but while(condition) {} doesn't?
body: <p>I always have problem with placing <code>;</code> at the end of <code>while</code> or not placing it at the end of <code>do while</code> loops. So what's the reason? Why </p>
  
  <pre><code>int numItemsToProcess = 3;  
  while(numItemsToProcess &gt; 0)  
  {  
      // process an item  
      numItemsToProcess--;  
  } 
  </code></pre>
  
  <p>doesn't need <code>;</code> at the end but </p>
  
  <pre><code>do  
  {  
      numItemsToProcess --;
  } while (numItemsToProcess &gt; 0);  
  </code></pre>
  
  <p>does?
  Maybe the reason is not too important. but when you know the reason you can remember where to put <code>;</code>.</p>