Write a program to compute the sum of the first n terms of the following series S=1+2+3-4+5....... | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Write a program to compute the sum of the first n terms of the following series S=1+2+3-4+5.......

Please help me to to find the answer

5th Mar 2019, 1:54 PM
Ratish Behera
Ratish Behera - avatar
2 Answers
+ 3
Try it by yourself first, then show us your attempt so I can help you
5th Mar 2019, 2:00 PM
Juan David Padilla Diaz
Juan David Padilla Diaz - avatar
0
Did you mean 1+2+3+4+5...? I'm not sure about the pattern of the series if it's 1+2+3-4+5... instead.
5th Mar 2019, 3:57 PM
Ah Zong
Ah Zong - avatar