Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created August 7, 2019 22:24
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/5541103d55e0f5fcdbdd9b9ee9a2060b to your computer and use it in GitHub Desktop.
Save parzibyte/5541103d55e0f5fcdbdd9b9ee9a2060b to your computer and use it in GitHub Desktop.
Elevar número a cualquier potencia con C Sharp - https://parzibyte.me/blog/2018/10/02/elevar-numero-a-potencia-en-c/
using System;
class Potencias{
public static void Main(){
int numero = 2, potencia = 32;
double elevado = Math.Pow(numero, potencia); // Elevarlo a la potencia 32
Console.WriteLine(string.Format("{0} elevado a la potencia {1} es {2}", numero, potencia, elevado));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment