This question has been asked ten thousands time, but never mind...
int gcd (int a, int b)
{
if (a<0) a= -a;
if (b<0) b= -b;
while (b > 0) { int tmp = b; b = a % b; a = tmp; }
return a;
}
if the gcd and lcm are given and one of the numbers are also given,multiply the gcd and lcm and divide them by the given number
use slide
You need at least two numbers to find a GCF.
You need at least two numbers to find a GCF.
You need at least two numbers to find something in common.
You need at least two numbers to find something in common.
You need at least two numbers to find something in common.
The greatest common divisor (GCD) of two numbers is the largest positive integer that divides both numbers without a remainder. To find the GCD of 2233 and 25193, you can use the Euclidean algorithm. By repeatedly applying the algorithm, you will find that the GCD of 2233 and 25193 is 59.
You should ask a question here, shouldn't you?
You need at least two numbers to find something in common between them.
Any two numbers who are relatively prime will workSo look at 9 and 4. Neither is prime and their GCD is 1.You must need two numbers with NO other factors in common.
The GCD is 2.