Skip to content

Instantly share code, notes, and snippets.

@bharathmuddada
Created May 26, 2021 08:11
Show Gist options
  • Select an option

  • Save bharathmuddada/b86eb723ba25be8b579fac5ea239f3a5 to your computer and use it in GitHub Desktop.

Select an option

Save bharathmuddada/b86eb723ba25be8b579fac5ea239f3a5 to your computer and use it in GitHub Desktop.
GCD in python
a =int(input("Enter your number \n"))
b =int(input("Enter your number \n"))
small = min(a,b)
for i in range(1,small+1):
if (a%i ==0 and b% i ==0):
gcd =i
print(gcd)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment