Here you can find the source of sumEachFigureFactor(int[] numbers)
private static int sumEachFigureFactor(int[] numbers)
//package com.java2s; //License from project: Apache License public class Main { private static final int FACTORS[] = { 7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2 }; private static int sumEachFigureFactor(int[] numbers) { int sum = 0; if (FACTORS.length == numbers.length) { for (int i = 0; i < numbers.length; i++) { for (int j = 0; j < FACTORS.length; j++) { if (i == j) { sum = sum + numbers[i] * FACTORS[j]; }//from w w w . jav a 2s . c om } } } return sum; } }