Is there a C++ algorithm to calculate the least common multiple for multiple numbers, like lcm(3,6,12) or lcm(5,7,9,12)?
lcm(3,6,12)
lcm(5,7,9,12)
boost provides functions for calculation lcm of 2 numbers (see here)
Then using the fact that
lcm(a,b,c) = lcm(lcm(a,b),c)
You can easily calculate lcm for multiple numbers as well