+ 12
How to compute the series?
s=x+x^2/2!+x^4/4!+x^6/6!+...+x^n/n!
2 Réponses
+ 5
Define a function "fact" to calculate factorial. Then,
for (int i = 1; i <= n; i++)
s += Math.pow(x, i) / fact(i);
+ 9
thank you
s=x+x^2/2!+x^4/4!+x^6/6!+...+x^n/n!