Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Voy a hacer el Máximo Común Divisor de n números con el algoritmo de Euclides
- n=int(input("Entre cuantos numeros quieres que te haga el maximo comun divisor "))
- a=int(input("Numero: "))
- for i in range(n-1):
- b=int(input("Numero: "))
- r=1
- while r!=0:
- r=a%b
- a=b
- b=r
- print("El maximo comun divisor es %d" %(a))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement