Skip to content

Instantly share code, notes, and snippets.

@yankees714
Created October 14, 2012 15:48
Show Gist options
  • Save yankees714/3888977 to your computer and use it in GitHub Desktop.
Save yankees714/3888977 to your computer and use it in GitHub Desktop.
Implementation of the Euclidean algorithm
int gcd(int a, int b){
if(a%b == 0)
return b;
else
return gcd(b,a%b);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment