title: Even numbers between 1 and 100 inclusive
body: <p>I need to display all the even numbers between 1-100 inclusive using a <code>while</code> loop. I couldn't mange it. I think it should be something like this :</p>
  
  <pre><code>int e = 1;
  while (( 1 &lt; e ) &amp;&amp; ( e &lt; 100 )) {
     e = e + 1;
  
     if (e % 2==0) {
        System.out.print(" " + e);
     }
  }
  </code></pre>
  
  <p>Edit - I did it like this:</p>
  
  <pre><code>while ( e &lt;= 100 ) { 
       e = e + 1;
       if ( e % 2 == 0)
       {   
           System.out.print(" " + e);
       }
  }
  </code></pre>