Created
June 27, 2018 00:10
-
-
Save lb5160482/394a1fed62d503bc32cc6d985d3c4553 to your computer and use it in GitHub Desktop.
Get GCD(Greatest Comman Devider)
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
int getGcd(int a, int b) { | |
return b == 0 ? a : getGcd(b, a % b); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment