added lcd computation

Added function to compute least common multiple.