Last active
August 29, 2015 14:02
-
-
Save metallurgix/d57bef4054a00f707020 to your computer and use it in GitHub Desktop.
GCD
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 gcd(int a, int b) | |
{ | |
while(b) b ^= a ^= b ^= a %= b; | |
return a; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment