Greatest Common Divisor

Find the greatest common divisor (GCD) of two numbers using the Euclidean algorithm.

Code

Algorithms
a.gcd(b)

Parameters

First number

Second number

Server

More Ruby Snippets