Merge pull request #513 from kriadmin/patch-5

Update lcm.md
This commit is contained in:
Angelos Chalaris
2018-01-08 22:27:56 +02:00
committed by GitHub

View File

@ -2,7 +2,7 @@
Returns the least common multiple of two or more numbers.
Use the greatest common divisor (GCD) formula and `Math.abs()` to determine the least common multiple.
Use the greatest common divisor (GCD) formula and the fact that `lcm(x,y) = x * y / gcd(x,y)` to determine the least common multiple.
The GCD formula uses recursion.
```js