GCD
Find the greatest common divisor of two given numbers
int GCD(int a, int b);
will return the greatest common divisor of two given numbers. There is no custom return type, the function always returns an integer.
GCD(12, 5); //1
GCD(64, 16); //16
GCD(23123, 353); //1
Last updated