Write a program to print the following sum series (1+2+3) + (2+3+4) + (3+4+5) …………… n terms. pls answer it correctly and it's urgent
Answers
Answered by
1
Answer:
Input : n = 10
Output : 4290
1*2*3 + 2*3*4 + 3*4*5 + 4*5*6 + 5*6*7 + 6*7*8 +
7*8*9 + 8*9*10 + 9*10*11 + 10*11*12
= 6 + 24 + 60 + 120 + 210 + 336 + 504 +
720 + 990 + 1320
= 4290
Input : n = 7
Output : 1260
Similar questions