title: Difference in while and do-while loops
body: <p>Can someone explain the purpose of having two different types of while loops? I am new to programming. Also supply example situations with the proper while loop if possible.</p>
  
  <p>I understand how to use a while loop. This is what I made:</p>
  
  <pre><code>bool myBool = true;
  int i = 0;
  
  while (myBool) {
    if (i &gt; 10) {
        myBool = false;
    }
    i = i + 1;
  }
  </code></pre>