Driver code
int main ( ) { int n ; n = 8 ; cout << nthTermOfTheSeries ( n ) << endl ; n = 12 ; cout << nthTermOfTheSeries ( n ) << endl ; n = 102 ; cout << nthTermOfTheSeries ( n ) << endl ; n = 999 ; cout << nthTermOfTheSeries ( n ) << endl ; n = 9999 ; cout << nthTermOfTheSeries ( n ) << endl ; return 0 ; }