What is the most efficient way to calculate the least common multiple of two integers?
I just came up with this, but it definitely leaves something to be desired.
Euclidean GCD code snippet
int findGCD(int a, int b) { if(a < 0 || b < 0) return -1; if (a == 0) return b; else if (b == 0) return a; else return findGCD(b, a % b); }