title: print numbers from 200 to 150 in reverse order and print numbers from 200 to 150 in a sequential order using while?
body: <p>how to print numbers from 200 to 150 in reverse order and print numbers from 200 to 150 in a sequential order using single while loop?</p>
  
  <pre><code>class test {
      public static void main(String[]args) {
          while(n&gt;=150) {
              System.out.println(n);
              n--;
          }  
          n=0;
          while(n&lt;=150) {
              System.out.println(n);
              n++;
          }
      }
  }
  </code></pre>