title: How can I store user inputs in an array of integers?
body: <p>I do not know how many numbers the user will input, and I need the program to stop inserting the numbers in the array when it reaches the end of the line, because in the new line the user will input a number that is not related to this.</p>
  
  <p>For exemple:</p>
  
  <p>The user could input:</p>
  
  <p>1 5 7 8 9 5</p>
  
  <p>4</p>
  
  <p>or:</p>
  
  <p>5 4 8 9 4 2 1 3 2 4 </p>
  
  <p>7</p>
  
  <p>The array I need would be, for exemple 1: [1, 5, 7, 8, 9, 5]</p>