+ 1

Who will help? C++

To calculate the sum: 1-2/3x+3/4x^(2)-4/5x^(3)+...+11/12x^(10) x = 2

12th Oct 2017, 5:21 AM
Swift ™XLEB
Swift ™XLEB - avatar
3 Answers
+ 2
x=2 eq="1" for i in range(1,11): eq+="-"+str(i+1)+"/"+str(i+2)+"x**"+str(i) print(eval(eq)) #A Python solution #I dunno if it works, but I think so
12th Oct 2017, 6:37 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
0
C++ please
12th Oct 2017, 8:06 AM
Swift ™XLEB
Swift ™XLEB - avatar