How to LCM in Groovy - Code Snippet

How to perform 'LCM' in Groovy.

example.groovy
// Task: LCM
// Language: Groovy

def lcm() {
    // Implementation for LCM
    def result = ...; // Initialize variable
    // TODO: Implement core logic here
    // Step 1: Prepare data
    // Step 2: Process LCM
    println("Done");
}
AdSense Slot