title: How can I reduce this code to use only one while loop?
body: <p>Here's my code so far: </p>
  
  <pre><code>public class EvenOdd
  {
     public static void main(String[]args)
     {
        System.out.print("Even numbers between 50 and 100: ");
        int e = 50;
        while (e &lt;= 100) {
           System.out.print(" " + e);
           e += 2;
        }
  
        System.out.print("\nOdd numbers between 50 and 100: ");
        int i = 51;
        while (i &lt;= 100) {
           System.out.print(" " + i);
           i += 2;
        }
     }
  }
  </code></pre>
  
  <p>How can I reduce these two while loops to just one while loop?</p>