Created
January 8, 2022 06:59
-
-
Save Hossara/9639340c681249b6facc48e6177c2e45 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
def gcd(a, b): | |
while b != 0: | |
(a, b) = (b, a % b) | |
return a | |
def main(): | |
while(True): | |
n1 = int(input("Please Enter First Number\n> ")) | |
n2 = int(input("Please Enter Secound Number\n> ")) | |
print("\n") | |
print(f"gcd({n1}, {n2}) = {gcd(n1, n2)}") | |
print("\n") | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment