I recently learned about a c++ special function called __gcd (A,B).
The greatest common divisor of A and B will be returned.
#include<iostream>
#include<algorithm>
using namespace std;
main()
{
cout<<__gcd(10,40); //op: 10
}
Is there a reason why the function definition begins with two underscores?
Like other STL functions, it might be as easy as gcd(A,B).