Sum of Series ( n ^ 2 | C # program to finding the sum of the nth series ; Function that calculate the sum of the nth series ; Using formula of the nth term ; Driver Code
using System ; class GFG { static int sum_series ( int n ) { int nSquare = n * n ; return nSquare * ( nSquare - 1 ) / 4 ; } public static void Main ( ) { int n = 2 ; Console . Write ( sum_series ( n ) ) ; } }