title: Multiple inputs without knowing the number of inputs user can give
body: <p>If we need to take multiple inputs but its unknown that how much user will give inputs and also we cant ask user to give number of inputs. How can we solve this problem</p>
  
  <pre><code>int n= Int32.Parse(Console.ReadLine());
  int[] arr=new int[n];
  for(int i=0;i&lt;n;i++)  //
   arr[i]=Int32.Parse(Console.ReadLine());
  </code></pre>
  
  <p><em>In the above code, first I took the number of inputs user want to enter i.e 'n' and then I ask the inputs from the user. Now suppose, if I don't want to ask the number of inputs i.e 'n' from the user and want to take as many inputs as much the user wants to give i.e arr[i]. what I am thinking is, after entering the inputs if the user pauses for some seconds then the loop (here 'for' loop) should automatically stop and the input which is given just before the pause will be the last input to the array (arr[i]). Is there any method to solve this problem</em></p>