Ask your own question, for FREE!
Computer Science 20 Online
OpenStudy (anonymous):

C++ Program to print following series : x + x^3/3! + x^5/5! +.......+ x^n/n!

OpenStudy (espex):

What have you tried so far and where are you stuck?

OpenStudy (anonymous):

No....Idea...

OpenStudy (anonymous):

Only Thing i knw is to Find the Sum of X + x^2 + x^3 .......x^n...

OpenStudy (anonymous):

i knw to find the Factorial of a given.....number....but idk to implement accoring to power like x^3/3! x^4/4!

OpenStudy (anonymous):

use the exp function <cmath>

OpenStudy (anonymous):

in python - looks about the same in c: def sinh(x): { a = x sum = a n = 2 while a > .1: { a = a * x**2 / (n * (n + 1)) sum += a n = n + 2 } return sum }

OpenStudy (espex):

You could create a recursive function to print the values out for you. As for how to do powers, it really depends on how far you have come in the lesson. If you are following a curriculum then you are most likely just supposed to do x*x*x for x^3, if you are not following any lesson plan then you can probably use the exp() function as was suggested earlier. http://www.cplusplus.com/reference/clibrary/cmath/exp/

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!