title: JAVA - using FOR, WHILE and DO WHILE loops to sum 1 through 100
body: <p>As the title states, I have trouble understanding loops and have come up with a way to do a simple 1 through 100 sum, but like I said, the loops are causing me some confusion. I think I have the FOR Loop figured.</p>
  
  <p>Here's what I've come up with.</p>
  
  <pre><code>int sum = 0; 
  for (int i = 1; i &lt;= 100; i++) sum += i; 
  System.out.println("The sum is " + sum);
  </code></pre>