title: Converting for loop to do while loop in C++
body: <p>I need to convert this for loop to a do while:</p>
  
  <pre><code>for (int i = 0; i &lt;= input; i = i + 2)
  {
      cout &lt;&lt; name &lt;&lt; " is number " &lt;&lt; input &lt;&lt; endl;
      total = total + i;
  }
  cout &lt;&lt; endl;
  cout &lt;&lt; total &lt;&lt; endl;
  </code></pre>
  
  <p>This is what I have so far:</p>
  
  <pre><code>do
  {
      cout &lt;&lt; name &lt;&lt; " is number " &lt;&lt; input &lt;&lt; endl;
      i += 2;
      total += i;
  } while (i &lt;= input);
  cout &lt;&lt; endl;
  cout &lt;&lt; total &lt;&lt; endl;
  </code></pre>
  
  <p>It doesn't give the same total value as the for loop. What am I doing wrong?</p>