计算序列和
-
C/C++程序来计算序列的和,其中第n项为n的2次方减去(n-1)的2次方
在这里我们将看到如何计算具有n-th项为n2 – (n-1)2的系列的总和。递归关系如下所示 – Tn = n2 – (n−1)2 因此,该系列为 – 我们需要找到S mod (109 + 7),其中S是给定系列的所有项的总和。 例子 #include…
-
C/C++程序:计算以n的平方减去(n-1)的平方为第n项的序列的和
There are many types of series in mathematics which can be solved easily in C programming. This program is to find the sum of following of series in C…