SHARE
TWEET

Untitled

a guest Jun 26th, 2019 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import math
  2. salida = True
  3. while salida:
  4.     repeticion = True
  5.     while repeticion:
  6.         tecladoPersona = input("por favor ingresa A y B: ")
  7.         numeroA = int(tecladoPersona.split(" ",2)[0])
  8.         numeroB = int(tecladoPersona.split(" ",2)[1])
  9.         if numeroA==0 and numeroB==0:
  10.             salida = False
  11.             break
  12.         if numeroA<0 or numeroA>10000:
  13.             print("numero A fuera del rango permitido")
  14.         if  numeroB<1 or numeroB>10000:
  15.             print("numero B fuera del rango permitido")
  16.         else:
  17.             repeticion = False
  18.             if numeroA>=0 and numeroB>=1 and numeroA<10000 and numeroB<10000:
  19.                 print("Maximo comun divisor de "+str(numeroA)+"! y ", numeroB,": ", math.gcd(math.factorial(numeroA), numeroB))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top