C program to calculate the sum of the series 1+(1+2) +(1+2+3) +(1+2+3+4) +...+(1+2+3+...+n)
belongs to collection: Sum of series programs/examples in C programming language
All Answers
total answers (1)
belongs to collection: Sum of series programs/examples in C programming language
total answers (1)
We know the sum of natural numbers up to n = (n(n-1))/2
If we simplify this we get, n(n+1)(2n+4)/12
If we put the number of terms in the above equation then we'll get the sum of the series up to that particular term.
Now, let's see Program it using the using c program,
Output
need an explanation for this answer? contact us directly to get an explanation for this answer