Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def findGreatestCommonDivisor(a, b):
- while a != b:
- if a > b:
- a = a - b
- return findGreatestCommonDivisor(a, b)
- elif a <= b:
- b = b - a
- return findGreatestCommonDivisor(a, b)
- return a
- print findGreatestCommonDivisor(12387, 1239)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement