Skip to content

Instantly share code, notes, and snippets.

@paranoidxc
Created May 22, 2014 07:28
Show Gist options
  • Save paranoidxc/4dbe4b5e5d355fe2c26f to your computer and use it in GitHub Desktop.
Save paranoidxc/4dbe4b5e5d355fe2c26f to your computer and use it in GitHub Desktop.
int gcd(int m, int n) {
if ( n == 0 ) return m;
return gcd(n, m % n);
}
#include <stdio.h>
int main () {
printf("%d\n", gcd( 12, 8 ) );
system("pause");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment