How to GCD in Ruby - Code Snippet

How to perform 'GCD' in Ruby.

example.rb
# Task: GCD
# Language: Ruby

def gcd() 
    # Implementation for GCD
    # TODO: Implement core logic here
    # Step 1: Prepare data
    # Step 2: Process GCD
    puts("Done");
end
AdSense Slot