Advertisement
fenix15100

While EX3

Oct 20th, 2014
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.24 KB | None | 0 0
  1. numero=int(input("Dime un numero "))
  2. result=1
  3.  
  4. while (numero > 0):
  5.     result= result*numero
  6.     numero = numero -1
  7.  
  8.  
  9.  
  10. if numero<0:
  11.         print("El valor es negativo o igual a 0, error")
  12. else:
  13.         print ("El factorial es ",result)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement