Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!usr/bin/python
- n = int(input("Digite un numero: "))
- fact = 1
- if n<0:
- print("Numero debe ser positivo.")
- else:
- while n>1:
- fact = fact*n
- n -= 1
- print("Factorial del numero es: ", fact)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement