Sum of first n even numbers | C # implementation to find sum of first n even numbers ' ; function to find sum of first n even numbers ; required sum ; driver function
using System ; public class GfG { static int evenSum ( int n ) { return ( n * ( n + 1 ) ) ; } public static void Main ( ) { int n = 20 ; Console . WriteLine ( " Sum ▁ of ▁ first ▁ " + n + " ▁ Even ▁ numbers ▁ is : ▁ " + evenSum ( n ) ) ; } }