Source |
CodingSec |
Identifiant |
70564 |
Date de publication |
2016-09-15 18:00:24 (vue: 2016-09-15 18:00:24) |
Titre |
How to find the GCD of a number in recursive and non-recursive methods |
Texte |
In mathematics, the greatest common divisor (gcd) of two or more integers, when at least one of them is not zero, is the largest positive integer that divides the numbers without a remainder. For example, the GCD of 8 and 12 is 4. One good way to find the least common multiple of 2 numbers is to multiply both numbers by 1,2,3,4,5… and then find the first multiple that appears in both lists. The first number that appears in both lists is 24. (48 appears also, but it is not ‘least’), so 24 is the LCM of 6 and 8.
|
Envoyé |
Oui |
Condensat |
5… also appeared appears both but coding common divides divisor example find first gcd good greatest how integer integers largest lcm least lists mathematics methods more multiple multiply non not number numbers one positive post recursive remainder security them then two way when without zero |
Tags |
|
Stories |
|
Notes |
|
Move |
|