LCM
Calculates the least common multiple of the given numbers.
- Define a
_GCD()
method that determines the greatest common divisor, using recursion. - Use
_GCD()
and the fact thatLCM(x, y) = x * y / GCD(x,y)
to determine the least common multiple. - Use
IEnumerable.Aggregate()
to applyLCM()
to all the given arguments.