+ 1
Write a c++programme to find sun of n series =1+(2/3!)+(3/5!)+(4/7!)......+....
c++
2 Antworten
+ 15
it will be a simple 1-liner
//use maths , take reference from my code & derive general formula for sum
//my old code , when i started with java ☺👍
https://code.sololearn.com/cDMkrs0n9cM6/?ref=app
+ 1
1/1! + 2/3! + 3/5! ... n/(2n-1)!
∞
<=> ∑ n/(2n-1)! =~1,36 (-> e/2 ? idk... ^^)
n=1
Anyways... you need a while loop which exits when the difference between the last and current result is smaller than a certain (small) value. That would end with an approximation of the sum of this sequence.