Example: 72 and 120.
The factors of 72 are 1, 2, 3, 4, 6, 8, 9, 12, 18, 24, 36, 72
The factors of 120 are 1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 20, 24, 30, 40, 60, 120
Now, which are the same?
1, 2, 3, 4, 6, 8, 12, 24
Which number is the largest?
24, the GCD
what is the example of conclusion
Here is an example: ____________________________
A triangular prism is one example.
a mountain structure is an example of elevation
A rhombus is always an example of a polygon.
public class GCD { public static void main(String[] args) { //Example how to use this method System.out.println(GCD(15,50)); } //find the greatest common divisor of two numbers public static int GCD(int a, int b){ if (b == 0) return a; return GCD(b, a % b); } } Hope this help to solve you problem.
GCD(125, 225) = 25 GCD(125, 225) = 25 GCD(125, 225) = 25 GCD(125, 225) = 25
Euclid's algorithm is a popular algorithm to compute the GCD of two numbers. Algorithm: Gcd(a,b) = Gcd(b, a mod b), where a>=b and Gcd(a,0) = a Say we want to find the GCD of 72 and 105. 105 mod 72 = 33, so GCD(72,105) = GCD(33,72) 72 mod 33 = 6, so GCD(33,72) = GCD(6,33) 33 mod 6 = 3 so GCD(6,33) = GCD(3,6) 6 mod 3 = 0 so GCD(3,6) = GCD(0,3) = 3. So the GCD of 72 and 105 is 3.
19 is a prime number, so the GCD is 1 * * * Right answer, wrong reason. 19 is indeed a prime but the GCD of 19 and 38, for example, is not 1.
GCD: 4
GCD: 2
GCD: 1
GCD: 75
GCD: 648
GCD: 3
GCD: 5
GCD: 5