Learn the fundamentals of Angular 2, a JavaScript framework for developing dynamic single page applications.

Hello,

i am making a program in c#, and i like to get my formulas into the program but i dont know how , could any one help me

i upload my formulas there are four :

how can i write the formulas in c# language

thank you

formule.png

i am making a program in c#, and i like to get my formulas into the program but i dont know how , could any one help me

i upload my formulas there are four :

how can i write the formulas in c# language

thank you

formule.png

Experts Exchange Solution brought to you by

Enjoy your complimentary solution view.

Get every solution instantly with Premium.
Start your 7-day free trial.

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

And

N = (Math.log10(Kn) - Math.log10(K0))/Math.log10

The rest should be easy from there (my kid's crying).

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial```
class Berekening {
public double BeginKapitaal( double k0, double kn, byte n) {
double p;
p = 100 * (Math.Pow(kn / k0, 1 / n) - 1);
return p;
}
```

RESULT

k0: 100000

kn : 200000

n : 15

Answer : 0

Could you please help me

Why ?

```
using System;
namespace MenuSamengesteldeIntrest {
class Berekening {
public double BeginKapitaal( double k0, double kn, byte n) {
double p;
p = 100 * (Math.Pow(kn / k0, 1.0 / n) - 1);
kn = k0 * (Math.Pow(1 + p / 100, n));
k0 = kn / ((Math.Pow(1 + p / 100, n)));
n = Math.Log(kn) - Math.Log(k0)/ Math.Log(1+ p / 100); // but for this line i get an error message " Error 1 Cannot implicitly convert type 'double' to 'byte'. An explicit conversion exists (are you missing a cast?) "
"
return p;
}
}/*Berekening*/
}/*MenuSamengesteldeIntrest*/
```

and are the formules right ?

```
p = 100 * (Math.Pow(kn / k0, 1.0 / n) - 1);
kn = k0 * (Math.Pow(1 + p / 100, n));
k0 = kn / ((Math.Pow(1 + p / 100, n)));
n = Math.Log(kn) - Math.Log(k0)/ Math.Log(1+ p / 100);
```

Thanks

Try

n = Convert.ToByte(Math.Log(kn

i guess i made a fault in converting the formule into c# language .

System.OverflowException was unhandled

C#

From novice to tech pro — start learning today.

Experts Exchange Solution brought to you by

Enjoy your complimentary solution view.

Get every solution instantly with Premium.
Start your 7-day free trial.

Use Math.Pow(base, exponent) for power and Math.log10(number) for log.

For the nth root use

P = 100* (Pow( (Kn/K0), 1/N) - 1)