Driver code
public static void Main ( ) { int n ; n = 8 ; Console . WriteLine ( nthTermOfTheSeries ( n ) ) ; n = 12 ; Console . WriteLine ( nthTermOfTheSeries ( n ) ) ; n = 102 ; Console . WriteLine ( nthTermOfTheSeries ( n ) ) ; n = 999 ; Console . WriteLine ( nthTermOfTheSeries ( n ) ) ; n = 9999 ; Console . WriteLine ( nthTermOfTheSeries ( n ) ) ; } }