Created
August 24, 2020 10:58
-
-
Save lablnet/a9b09a304de684b2c455cd9d293f319a to your computer and use it in GitHub Desktop.
Pythonic way to find GCD.
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
| def gcd(a, b): | |
| return a if b == 0 else gcd(b, a % b) | |
| print(gcd(int(input("Enter value of a: ")), int(input("Enter value of b: ")))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment