Here you can find the source of lcm(int numberOne, int numberTwo)
public static int lcm(int numberOne, int numberTwo)
//package com.java2s; //License from project: Open Source License public class Main { public static int lcm(int numberOne, int numberTwo) { return numberOne % numberTwo == 0 ? numberOne : numberOne * numberTwo / gcd(numberOne, numberTwo); }/*from w ww .j av a 2s . co m*/ public static int gcd(int largerNumber, int smallerNumber) { return (smallerNumber == 0) ? largerNumber : gcd(smallerNumber, largerNumber % smallerNumber); } }