RosettaCodeData/Task/Exponentiation-order/C-sharp/exponentiation-order.cs
2023-07-01 13:44:08 -04:00

20 lines
469 B
C#

using System;
namespace exponents
{
class Program
{
static void Main(string[] args)
{
/*
* Like C, C# does not have an exponent operator.
* Exponentiation is done via Math.Pow, which
* only takes two arguments
*/
Console.WriteLine(Math.Pow(Math.Pow(5, 3), 2));
Console.WriteLine(Math.Pow(5, Math.Pow(3, 2)));
Console.Read();
}
}
}