Sum of finite series in C++ | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Sum of finite series in C++

Write a C++ program to find the sum of: x+(x^3/2!)+(x^5/3!)+(x^7/4!)+...+(x^[2m-1]/m!) For a random value of ‘m’.

27th Sep 2018, 3:08 PM
Koustub Poddar
Koustub Poddar - avatar
3 Answers
+ 3
[FIXED] That sequence looks broken to me, i.e. it doesn't match the generalization in at least two (edit: just one) spots (unless I'm missing something; cmiiw)
27th Sep 2018, 3:29 PM
Kirk Schafer
Kirk Schafer - avatar
+ 2
Ketan Lalcheta Ah, it's been fixed :) No worries.
27th Sep 2018, 4:30 PM
Kirk Schafer
Kirk Schafer - avatar
0
it's correct.. Kirk Schafer ...no broken is found for me.. first term is x because 2m-1 /m! is 1 for m as 1...next steps are for m as 3 and 5, 2m-1/m! means (2*4)-1/ 5! is perfect for 7/5!
27th Sep 2018, 4:03 PM
Ketan Lalcheta
Ketan Lalcheta - avatar