1.2^2+2.3^2+3.4^2+4.5^2+ need to calculate the sum up-to nth number with C programming. But I can't find any way to solve the program.
When the user in put 4 as the value of n, the sum will be the total of 1.2^2+2.3^2+3.4^2+4.5^2.
Can anyone help me get the algorithm?
for
loop? Also, presumably you mean a power series,^
is XOR in C. But, check there's not a closed-form solution to this first.