Skip to content

Instantly share code, notes, and snippets.

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