Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # MCD En Python
- def mcd(a, b):
- if a <= 0 or b <= 0:
- raise ValueError("Error de argumento en MCD")
- resto = a % b
- while resto != 0:
- a = b
- b = resto
- resto = a % b
- return b
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement