Skip to content

Instantly share code, notes, and snippets.

@shellsong
Created November 7, 2014 12:47
Show Gist options
  • Save shellsong/c1150852cd1f11d86e59 to your computer and use it in GitHub Desktop.
Save shellsong/c1150852cd1f11d86e59 to your computer and use it in GitHub Desktop.
greatest common divisor
function gcd(a,b){
return b>0?gcd(b,a%b):a;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment