You have an array of integers (positive and non-zero) and an integer . Your job is to find the largest product of consecutive elements in the array. For example, with the array and , the largest product of consecutive elements is .
Here is the pseudocode to solve the problem. Please complete it.
(How can you efficiently solve the problem if the array also contains negative integers and zeros? Please provide your solution in the comment box below.)