title: How to dynamically take user input and store it into an integer array
body: <p>I have an integer array like <code>int a[50];</code>. Now I want to store values entered by the user in the integer array as integers.<br>
  The problem is that I don't know the number of elements the user is going to input and hence I am unable to traverse the entire array.</p>
  
  <p>So is there any method for the user to input the values dynamically and store it in the integer array and display it.</p>