Program to find the sum of the series 23 + 45 + 75 + ... . . upto N terms | CPP program to find sum upto N - th term of the series : 23 , 45 , 75 , 113. . . ; calculate Nth term of series ; Driver Function ; Get the value of N ; Get the sum of the series
#include <iostream> NEW_LINE using namespace std ; int findSum ( int N ) { return ( 2 * N * ( N + 1 ) * ( 4 * N + 17 ) + 54 * N ) / 6 ; } int main ( ) { int N = 4 ; cout << findSum ( N ) << endl ; return 0 ; }