title: Example of a while loop that cannot be replaced by a for loop
body: <p>The question basically is similar to what is posted here <a href="https://stackoverflow.com/questions/1514382/example-of-a-while-loop-that-cant-be-a-for-loop">Example of a While Loop that can&#39;t be a For Loop</a> except that there isn't one such example where a certain program using the while loop cannot be replaced by the for loop because of its limitations.</p>
  
  <p>An example is</p>
  
  <pre><code>i=0;
  while(i&lt;10)
  {
      continue;
      i=i+2;
  }
  
  and
  
  for(i=0;i&lt;10;i++)
  {
      continue;
      i++;
  }
  </code></pre>
  
  <p>In the for loop the continue doesn't stop the increment. I wanted to see something different.</p>