Search Results

Search found 1 results on 1 pages for 'lhea bernardino'.

Page 1/1 | 1 

  • Function Procedure in Java

    - by Lhea Bernardino
    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. Sample Input: 5 2 7 Sample Output: 2 5 7 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 here is my sample code: import javax.swing.JOptionPane; public class ascending { public static void main(String args[]) { for(int x= 0; x<3;x++) { String Snum = JOptionPane.showInputDialog("Enter a number"); int num = Integer.parseInt(Snum); } <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. :'( >

    Read the article

1