How do I calculate power-of in C#?

后端 未结 8 1519
别跟我提以往
别跟我提以往 2021-01-01 08:08

I\'m not that great with maths and C# doesn\'t seem to provide a power-of function so I was wondering if anyone knows how I would run a calculation like this:



        
8条回答
  •  孤城傲影
    2021-01-01 09:07

    See Math.Pow. The function takes a value and raises it to a specified power:

    Math.Pow(100.00, 3.00); // 100.00 ^ 3.00
    

提交回复
热议问题