0

I need to program a simple task! That is computing the value of (1+x)e^x.

using the equation 1 + 2x/1! + 3x²/2! + 4x³/3! add terms to the sum of the series as long as absolute value of the current term is greater than given tolerance. and count number of terms must compute new term as the old term multiplied by an expression, independent calculation is not allowed. tolerance = 1e-17 and x=1. i found this in my textbook but cant do it. i am getting infinite loop. thanks

4th Oct 2017, 1:31 AM
Arafatur Rahman
Arafatur Rahman - avatar
2 Answers
+ 2
There you go. You use a while loop and you're good :P https://code.sololearn.com/cw0qf78DeVhd/?ref=app
4th Oct 2017, 2:06 AM
Schindlabua
Schindlabua - avatar
+ 1
thanks a lot
4th Oct 2017, 2:14 AM
Arafatur Rahman
Arafatur Rahman - avatar