Created
August 7, 2019 22:24
-
-
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/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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