Skip to content

Instantly share code, notes, and snippets.

@Hossara
Created January 8, 2022 06:59
Show Gist options
  • Save Hossara/9639340c681249b6facc48e6177c2e45 to your computer and use it in GitHub Desktop.
Save Hossara/9639340c681249b6facc48e6177c2e45 to your computer and use it in GitHub Desktop.
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