title: Print Consecutive numbers by comparing two parameters
body: <p>input <code>3,5</code> output should be <code>3,4,5</code></p>
  
  <p>input <code>5,3</code> output should be <code>5,4,3</code></p>
  
  <p>And the code</p>
  
  <pre><code>public static void test(int a, int b) {
          if(a&gt;b) {
              for (int i = a; i &gt;= b; i--) {
                  System.out.print(i + "\t");
              }
          }else if(a&lt;b) {
              for (int i = a; i &lt;= b; i++) {
                  System.out.print(i + "\t");
              }
          }
      }
  </code></pre>
  
  <p>It works but looks a little messy. Is it possible to do without <code>if else</code> thing? Only one loop.</p>