Created
August 7, 2019 22:23
-
-
Save parzibyte/fe467758fe732b1f29df3e201100677e to your computer and use it in GitHub Desktop.
Elevar número al cuadrado con C# - 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 = 10; | |
double elevadoAlCuadrado = Math.Pow(numero, 2); // Elevarlo a la potencia 2 | |
Console.WriteLine(string.Format("{0} elevado al cuadrado es {1}", numero, elevadoAlCuadrado)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment