0
I want to find the sum of the series:1+3+6+10+15+...upto n terms.what has gone wrong in my code?
What is wrong in my code https://code.sololearn.com/cUhXowIU2QvM/?ref=app
1 Answer
+ 1
Line 6:
a=1, d=3;
Lines 9-11:
for(i=3;i<=n+1;i++)
{a+=d;
d+=i;}