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: ")
- if a1=="00":
- main1()
- b1=input("Inserisci il secondo numero: ")
- if b1=="00":
- main1()
- a=int(a1)
- b=int(b1)
- if a==0 or b==0:
- a=6
- b=0
- a/b
- if a>b:
- x=a
- elif a<b:
- x=b
- elif a==b:
- x=a
- for y in range(a*b):
- if x%a==0 and x%b==0:
- break
- else:
- x=x+1
- print('\n'*1000)
- print("Il minimo comune multiplo 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