/* For more exercises, visit shegertech.blogspot.com or shegertech.com Author: Eyasu M. Email: eyasu@india.com */ public class FactorialAverage { public static void main(String[] args) { int factorial; double sum = 0; int[] x = new int[8]; for (int i = 3, k = 0; i <= 10; i++, k++) { factorial = 1; for (int y = 1; y <= i; y++) { factorial *= y; } x[k] = factorial; sum += x[k]; } System.out.println(sum / x.length); } }