title: how to sort numbers without arrays
body: <p>I want to sort numbers <strong><em>without using Arrays</em></strong>. I have this:</p>
  
  <pre><code> Scanner s = new Scanner(System.in);
      System.out.print("Input 3 numbers: ");
      int a = s.nextInt();
      int b = s.nextInt();
      int c = s.nextInt();
  
      System.out.print("Increscent: ");
  
      if (a &gt;= b) { 
          int temp; 
  
          temp = a;
          a = b;
          b = temp;
      }
  
      if (c &lt; a) 
      {
          System.out.println(c + " " + a + " " + b);
      } else if (c &gt; b) 
      {
          System.out.println(a + " " + b + " " + c);
      } else 
      {
          System.out.println(a + " " + c + " " + b);
      }
  </code></pre>
  
  <p>But what should I do if I want to use more numbers? Is there some better  code or I must use this way all the time? </p>