Commit dc969c5

mo <mokha@cisco.com>
2017-06-07 19:50:42
greatest commond divisor using Euclids algorithm.
1 parent 0562662
Changed files (1)
lib/gcd.rb
@@ -0,0 +1,9 @@
+require 'pp'
+
+def gcd(p, q)
+  return p if q == 0
+  gcd(q, p % q)
+end
+
+
+fail unless gcd(1440, 408) == 24