I am trying to populate an array with numbers input by the user, but I don't know the number of inputs beforehand. For example: if the user inputs the numbers 6 12 52, I would need to create arr[3] and put those numbers in it, but if the user inputs 4 5 10 11 45, I would need to create arr[5].

An alternative to this would be that since the maximum number of cells I want my array to have is 12, is there a way to put fewer than 12 inputs into array[12] and delete the remaining cells?

This may be an obvious question, but I cannot seem to find any helpful information on the matter. 

Thank you for any assistance.