public static void Main()
var array=new int[]{1,2,3,4,5};
var result = test(array);
foreach(var item in result){
public static int[] test(int[] input){
var result=new int[input.Length];
for(var i=0; i< input.Length; i++){
result[i]=product(input,i);
public static int product(int[] array, int currentIndex){
for(var i=0; i<array.Length; i++){