Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created October 6, 2020 21:29
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/f73e3e5cbd1dc60237f2f15b6ebf35ae to your computer and use it in GitHub Desktop.
Save parzibyte/f73e3e5cbd1dc60237f2f15b6ebf35ae to your computer and use it in GitHub Desktop.
long potenciaRecursiva(long numero, long potencia)
{
if (potencia <= 0)
{
return 1;
}
else
{
return numero * potenciaRecursiva(numero, potencia - 1);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment