int maxCommonDivisor(int m, int n) { if (m % n == 0) { return n; } else { return maxCommonDivisor(n, m % n); } } int minCommonMultiple(int m, int n) { return m * n /(maxCommonDivisor(m, n)); }