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

26th Sep 2019, 4:59 PM
SOUMYADEEP BISWAS
1 Odpowiedź
+ 1
Line 6: a=1, d=3; Lines 9-11: for(i=3;i<=n+1;i++) {a+=d; d+=i;}
26th Sep 2019, 6:22 PM
Diego
Diego - avatar