Find Nth term of the series 0 , 2 , 4 , 8 , 12 , 18. . . | C # program to find N - th term of the series : 0 , 2 , 4 , 8 , 12 , 18. . . ; Calculate Nth term of series ; Driver program
using System ; class gfg { public int nthTerm ( int N ) { int n = ( ( N + N * ( N - 1 ) ) / 2 ) ; return n ; } static void Main ( string [ ] args ) { gfg p = new gfg ( ) ; int a = p . nthTerm ( 5 ) ; Console . WriteLine ( a ) ; Console . Read ( ) ; } }