0

I need to write n, in the formula below, as an exponent. Any ideas on how I can do that since I can't use the ^ sign in C#. Thanks

I already used the ^ sign but it doesnt work.

//Calculation

P = L x[(1 + .00583)^n * .00583] / [(1 + .00583)^n - 1];
//P = L*c(1 + c)n(1 + c)n−1;
Ola Ström
  • 4,136
  • 5
  • 22
  • 41

2 Answers2

2

You can use the Math.Pow static Method.

Math.Pow(Double, Double)

So your expression could be written in the form :

    P = (L * Math.Pow(1 + .00583,n) * .00583) / (Math.Pow(1 + .00583,n) - 1);
Zack ISSOIR
  • 964
  • 11
  • 24
1

You can use the Math class' method "Pow" example:

Math.Pow(1 + .00583, n)

and only use normal brackets ()

Malior
  • 1,221
  • 8
  • 16