text: Central polygonal numbers | C ++ program to find N - th term in the series ; Function to find N - th term in the series ; Driver code
code: #include <iostream> NEW_LINE #include <math.h> NEW_LINE using namespace std ; void findNthTerm ( int n ) { cout << n * n - n + 1 << endl ; } int main ( ) { int N = 4 ; findNthTerm ( N ) ; return 0 ; }