Skip to content

Instantly share code, notes, and snippets.

@henriquesebastiao
Created May 15, 2023 00:23
Show Gist options
  • Save henriquesebastiao/ea8f6e99f00493c1a833633054275b09 to your computer and use it in GitHub Desktop.
Save henriquesebastiao/ea8f6e99f00493c1a833633054275b09 to your computer and use it in GitHub Desktop.
Cálculodo de fatorial de um número informado pelo usuário.
k = 1
fat = 1
numero = int(input("Informe um número: "))
while k <= numero:
fat *= k
k += 1
print(f"fat({k - 1}) = {fat}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment