Should the loop terminator be based on the size of the array, rather than the int that was input?