I've already written down the code for a procedure that modifies an incoming array of doubles by normalizing it. To normalize the array of numbers, I had to divide each number by the maximum value in the array. However, my code forces me to implement System.Linq
Here's my code:
public void Test9(double[] numbers)
{
double MaximumNumber = numbers.Max();
for (int i = 0; i < numbers.Length; i++)
{
numbers[i] = numbers[i] / MaximumNumber;
}
}
My question, how can I achieve the same solution without implementing using System.Linq;
at the top of the program.