Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/zubayerhimel/fun-gcd

Find the Greatest Common Divisor using Euclidean Algorithm
https://github.com/zubayerhimel/fun-gcd

euclidean-algorithm gcd npm npm-package

Last synced: 2 months ago
JSON representation

Find the Greatest Common Divisor using Euclidean Algorithm

Lists

README

        

Get **Greatest Common Divisor (GCD)** using Euclidean Algorithm.

**Install**

```
npm i fun-gcd
```

**Usage**

```js
// es5
const eq = require("fun-gcd");

// es6
import eq from "fun-gcd";

console.log(eq.gcdOfTwo(2, 3));
// => 1

console.log(eq.gcdOfTwo(7, 77));
// => 7
```