Created
December 19, 2019 17:09
-
-
Save parzibyte/ad5f88dd1d5037bd524dc57ffe1a9192 to your computer and use it in GitHub Desktop.
This file contains 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
// Si quieres puedes usar la función de MCD recursiva: https://parzibyte.me/blog/2019/12/18/maximo-comun-divisor-c-algoritmo-euclides/ | |
int maximo_comun_divisor(int a, int b) { | |
int temporal;//Para no perder b | |
while (b != 0) { | |
temporal = b; | |
b = a % b; | |
a = temporal; | |
} | |
return a; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment