+ 1
Used for function
Pleas help, c++ formula, used for function - S= 1Ă2+2Ă3+3Ă4+....+49Ă50;?
5 Answers
+ 1
a*(a + 1) = a**2 + a,
So S is (sum of squares from 1**2 till 49**2) + (sum from 1 till 49) now for these last two you should know the formulas
+ 1
A simple "for" loop is all you need:-
...and do something like......total += i * (i+1) for the body.
+ 1
make a sum variable
make a forloop to run from 1 to 50
within the loop assign the sum to be counter*counter++
0
What is the common factor of the sequence: a_n = 1*2, 2*3, 3*4, ..., 49*50?
Like sequence: b_n = 1, 4, 9, ...
Could have common factor of: b_n = n*n
What could be the common factor of a_n?
0
I saw your question and I did this code, don't know if it helps
https://code.sololearn.com/cJbPK6JAEKPh/?ref=app