loading...

re: Daily Coding Problem #2 VIEW POST

FULL DISCUSSION
 

private void ArrayProduct(int arraySize, int [] numArray)
{
int[] prodArray = new int[arraySize];

        for (int i = 0; i < arraySize; i++)
        {
            prodArray[i] = 1;

            for (int k = 0; k < arraySize; k++)
            {
                if(k!=i)
                {
                    prodArray[i] *= numArray[k];
                }
            }

            Console.WriteLine(prodArray[i] + " , ");
        }
    }
Code of Conduct Report abuse