Updated User input array

Embedded Math.max into for loop to deal with "out of bounds" exceptions
when one of the arrays is shorter than the other.