Permalink
Browse files

readme and an example

  • Loading branch information...
1 parent 901c8bb commit 6be237b4c4c0a19ef81dc3a10833ee1883090cfe @substack committed Aug 12, 2012
Showing with 44 additions and 0 deletions.
  1. +3 −0 example/n.js
  2. +41 −0 readme.markdown
View
@@ -0,0 +1,3 @@
+var gcd = require('../');
+var n = gcd(121,44);
+console.log(n);
View
@@ -0,0 +1,41 @@
+# gcd
+
+Compute the greatest common divisor using
+[Euclid's algorithm](https://en.wikipedia.org/wiki/Greatest_common_divisor#Using_Euclid.27s_algorithm).
+
+# example
+
+``` js
+var gcd = require('gcd');
+var n = gcd(121,44);
+console.log(n);
+```
+
+***
+
+```
+11
+```
+
+# methods
+
+``` js
+var gcd = require('gcd')
+```
+
+## gcd(a, b)
+
+Return the greatest common divisor of the integers `a` and `b` using Euclid's
+algorithm.
+
+# install
+
+With [npm](http://npmjs.org) do:
+
+```
+npm install gcd
+```
+
+# license
+
+MIT

0 comments on commit 6be237b

Please sign in to comment.