Average of first n even natural numbers | Java Program to find the average of sum of first n even numbers ; Return the average of sum of first n even numbers ; driver code
import java . io . * ; class GFG { static int avg_of_even_num ( int n ) { return n + 1 ; } public static void main ( String [ ] args ) { int n = 8 ; System . out . println ( avg_of_even_num ( n ) ) ; } }