how to find the greatest common divisor and what is it code example
Example: greatest common divisor
int gcd (int a, int b) {
int temp;
while (a!=0) {
temp = a;
a = b%a;
b = temp;
}
return b;
}
int gcd (int a, int b) {
int temp;
while (a!=0) {
temp = a;
a = b%a;
b = temp;
}
return b;
}