Add note about Euclid's algorithm to greatest_common_divisior.lua
This commit is contained in:
parent
8edca7f075
commit
3558a24b47
@ -1,6 +1,8 @@
|
|||||||
-- The greatest common divisor (GCD) of two numbers X and Y is, as the
|
-- The greatest common divisor (GCD) of two numbers is, as the name
|
||||||
-- name suggests, the largest number which evenly divides both X and
|
-- suggests, the largest number which evenly divides both. Implement
|
||||||
-- Y. Implement the function below to calculate this.
|
-- the function below to calculate this. It's recommended that you
|
||||||
|
-- use Euclid's algorithm but feel free to use another approach if you
|
||||||
|
-- want.
|
||||||
--
|
--
|
||||||
-- Solution --------------------------------------------------------------------
|
-- Solution --------------------------------------------------------------------
|
||||||
function greatest_common_divisor(x, y)
|
function greatest_common_divisor(x, y)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user