lcm of set of numbers algorithm code example Example: least common multiple algorithm lcm = a / gcd * b;