Skip to content

Instantly share code, notes, and snippets.

@completejavascript
Created September 15, 2018 01:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save completejavascript/42ff12d38e324657634055c1caf8adea to your computer and use it in GitHub Desktop.
Save completejavascript/42ff12d38e324657634055c1caf8adea to your computer and use it in GitHub Desktop.
int LCM(int a, int b)
{
if(a == 0 || b == 0) return -1;
return (abs(a * b) / GCD(a, b));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment