Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created December 3, 2019 06:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/f0711a1285e6eafd18d96b1e571b507f to your computer and use it in GitHub Desktop.
Save parzibyte/f0711a1285e6eafd18d96b1e571b507f to your computer and use it in GitHub Desktop.
unsigned long long factorial(unsigned long long numero) {
// Si hemos llegado a 1, detenemos la recursión
if (numero <= 1)
return 1;
return numero * factorial(numero - 1); // Restar 1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment