Created
May 3, 2012 18:36
-
-
Save ciceroverneck/2587984 to your computer and use it in GitHub Desktop.
mdc in c
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 mdc(int a, int b){ | |
int resto; | |
while(b != 0){ | |
resto = a % b; | |
a = b; | |
b = resto; | |
} | |
return a; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment