Function Procedure in Java
<p>Create a program that will ask the user to enter 3 numbers using for loop, then test the numbers and display it in ascending order.</p>

<p>Sample Input:
5
2
7</p>

<p>Sample Output:
2
5
7</p>

<p>I'm stuck with the testing procedure. I don't know how to test the numbers since the variable holding those numbers is just a single variable and inside the for loop</p>

<p>here is my sample code:</p>

<pre><code>import javax.swing.JOptionPane;
public class ascending
{
  public static void main(String args[])
   {

 for(int x= 0; x&lt;3;x++)
 {
  String Snum = JOptionPane.showInputDialog("Enter a number");
  int num = Integer.parseInt(Snum);
 }

 &lt;Here comes the program wherein I will test the 3 numbers inputted by the user and
   display in ascending order. I don't know where to start. :'( &gt;
</code></pre>
