Created
February 16, 2013 22:52
-
-
Save coldcue/4969085 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int lnko(int a, int b) | |
{ | |
int bigger = (a>=b)?a:b, smaller = (a<=b)?a:b, ret=0, i; | |
for(i=1; i<=smaller; i++) | |
if(smaller%i==0 && bigger%i==0) ret = i; | |
return ret; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment