Second heptagonal numbers | C ++ implementation to find N - th term in the series ; Function to find N - th term in the series ; Driver code ; Function call
#include <iostream> NEW_LINE #include <math.h> NEW_LINE using namespace std ; void findNthTerm ( int n ) { cout << n * ( 5 * n + 3 ) / 2 << endl ; } int main ( ) { int N = 4 ; findNthTerm ( N ) ; return 0 ; } findNthTerm ( N ) ; return 0 ; }