The function for finding the greatest common factor __gcd in the C++<cmath> library is handwritten as follows:
int gcd(int a,int b)
{
return b?gcd(b,a%b):a;
}
The function for finding the greatest common factor __gcd in the C++<cmath> library is handwritten as follows:
int gcd(int a,int b)
{
return b?gcd(b,a%b):a;
}