Here you can find the source of minCommonMultiple(int m, int n)
public static int minCommonMultiple(int m, int n)
//package com.java2s; //License from project: Open Source License public class Main { public static int minCommonMultiple(int m, int n) { return m * n / maxCommonDivisor(m, n); }// ww w . java 2 s . com public static int maxCommonDivisor(int m, int n) { if (m < n) { // keep the order m > n int temp = m; m = n; n = temp; } if (m % n == 0) { // if m divide by n is 0, n is the max common divisor return n; } return maxCommonDivisor(n, m % n); // recurse n and the remainder of m divide n } }