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