Find the nth term of the given series | C ++ implementation of the approach ; Function to return the nth term of the given series ; Driver code
#include <bits/stdc++.h> NEW_LINE using namespace std ; int oddTriangularNumber ( int N ) { return ( N * ( ( 2 * N ) - 1 ) ) ; } int main ( ) { int N = 3 ; cout << oddTriangularNumber ( N ) ; return 0 ; }