Skip to content

Instantly share code, notes, and snippets.

@PforPeterPaul
Forked from yankees714/euclidean.c
Created October 14, 2012 17:22
Show Gist options
  • Save PforPeterPaul/3889237 to your computer and use it in GitHub Desktop.
Save PforPeterPaul/3889237 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