Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- oop=bool("false")
- def mcm() :
- global a1
- global a
- global b1
- global b
- global x
- try:
- a1=input("Inserisci il primo numero: ")
- b1=input("Inserisci il secondo numero: ")
- a=int(a1)
- b=int(b1)
- if a<b:
- x=b
- elif a>b:
- x=a
- elif a==b:
- x=a
- x=x+1
- if a==0 or b==0:
- error1=6/0
- else:
- for poi in range(999999999999999):
- print(a,b,x)
- if a%x==0 and b%x==0:
- break
- else:
- x=x-1
- print("Il Massimo Comune Divisore tra", a, "e",b,"e'",x)
- input("Clicca per continuare")
- print('\n'*1000)
- except ValueError :
- input(" Devi inserire un numero non una lettera")
- print('\n'*1000)
- #except ZeroDivisionError :
- # input(" Devi inserire un numero diverso da zero")
- #print('\n'*1000)
- while oop:
- mcm()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement