title: Adding the code for ascending order of user input
body: <pre><code>import java.util.Scanner;
  import java.util.Arrays;
  public class searchSorting 
  {
      public static void main (String[]args)
      {
          String line;
          Scanner in = new Scanner(System.in);
  
          System.out.print(&quot;How many numbers you want to input?: &quot;);
          line = in.nextLine();
          System.out.print(&quot;Input Number 1: &quot; );
          line = in.nextLine();
          System.out.print(&quot;Input Number 2: &quot;);
          line = in.nextLine();
          System.out.print(&quot;Input Number 3: &quot; );
          line = in.nextLine();
          System.out.print(&quot;Input Number 4: &quot;);
          line = in.nextLine();
          System.out.print(&quot;Input Number 5: &quot; );
          line = in.nextLine();
      }
      public static void sortAscending (double[]arr)
      {
          Arrays.sort(arr); 
          System.out.printf(&quot;Sorted arr[] = %s&quot;, 
          Arrays.toString(arr)); 
  
  }}
  </code></pre>
  <p>I am stuck on what the code is for putting the what the user inputs in ascending order. I have looked up and tried multiple resources on ascending order but nothing seems to work. I tried:</p>
  <pre><code>System.out.print(&quot;Input number 1: &quot;+(i+1+&quot;:&quot;);
  </code></pre>
  <p>to try and add the inputs instead of writing all of them out but i was an unknown variable.</p>