+ 1

How we find the sum of nth term ???

🙏📝📝

23rd Aug 2022, 6:41 PM
Abhishek Gupta
Abhishek Gupta - avatar
8 Answers
+ 3
Abhishek Gupta There are 2 main ways, in programming: -use for or while loops to sum a variable to its consecutive value, starting from 1 and going to n. -use the mathematical identity: Sn = n(n+1)/2 Where Sn is the sum of all the natural numbers up to n.
24th Aug 2022, 5:50 AM
Bonsai
Bonsai - avatar
+ 3
Try searchbar for consecutive numbers.
24th Aug 2022, 5:32 AM
Oma Falk
Oma Falk - avatar
+ 2
I suppose the task is to demonstrate the usage of loops. Again, please TAG THE RELEVANT PROGRAMMING LANGUAGE.
24th Aug 2022, 6:52 AM
Lisa
Lisa - avatar
+ 1
Do you mean the sum of all integers until n? By writing code! If you need help, please tag the relevant programming language and give a complete task description.
23rd Aug 2022, 6:52 PM
Lisa
Lisa - avatar
+ 1
I mean that the sum of all natural no. up to nth
24th Aug 2022, 12:36 AM
Abhishek Gupta
Abhishek Gupta - avatar
+ 1
Please, tag program language and show us your try
24th Aug 2022, 5:27 AM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
0
Hi! your question is unclear. could you ask it again (edit it) and make it clearer?
23rd Aug 2022, 6:51 PM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
0
How to use the Sololearn searchbar https://code.sololearn.com/W995A7y40Dow/?ref=app
24th Aug 2022, 5:34 AM
Yaroslav Vernigora
Yaroslav Vernigora - avatar