//Given an array of integers, return a new array such that each element at
//index i of the new array is the product of all the numbers in the original
//array except the one at i.
//
//For example, if our input was [1, 2, 3, 4, 5],
//the expected output would be [120, 60, 40, 30, 24].
//Explanation: [2*3*4*5 = 120, 1*3*4*5 = 60, 1*2*4*5 = 40, 1*2*3*5 = 30, 1*2*3*4 = 24]
using System;
class Program
{
public static void Main(string[] args)
int[] inputs = { 1, 2, 3, 4, 5 }; // products [120, 60, 40, 30, 24]
int[] products = DeriveProducts(inputs);
Console.WriteLine($"The products are: [{string.Join(", ", products)}]");
}
private static int[] DeriveProducts(int[] inputs)
//Add code here
return inputs;