LeastCommonMultiple.java
/**
     * The main method does the input and output and calls a method to calculate the least common
     * multiple value from 2 positive values.
     *
     * @param args unused
     */
The main method does the input and output and calls a method to calculate the least common
multiple value from 2 positive values.

@param args unused
The main method does the input and output and calls a method to calculate the least common multiple value from 2 positive values . @param args unused
public static void main(String[] args) {
        Scanner scnr = new Scanner(System.in);
        int userInput1 = 0;
        int userInput2 = 0;
        while (userInput1 >= 0 && userInput2 >= 0){
            System.out.println("Enter the first: ");
            userInput1 = scnr.nextInt();
            System.out.println("Enter the second number: ");
            userInput2 = scnr.nextInt();
            if (userInput1 < 0 || userInput2 < 0)
                System.out.println("Incorrect input! Please input again!");
        }
    }
public static void main ( String [ ] args ) { Scanner scnr = new Scanner ( System . in ) ; int userInput1 = 0 ; int userInput2 = 0 ; while ( userInput1 >= 0 && userInput2 >= 0 ) { System . out . println ( "Enter the first: " ) ; userInput1 = scnr . nextInt ( ) ; System . out . println ( "Enter the second number: " ) ; userInput2 = scnr . nextInt ( ) ; if ( userInput1 < 0 || userInput2 < 0 ) System . out . println ( "Incorrect input! Please input again!" ) ; } }
The main method does the input and output and calls a method to calculate the least common
 multiple value from 2 positive values.
The main method does the input and output and calls a method to calculate the least common multiple value from 2 positive values .
// prompt user for 2 positive number