title: c# Fill multiple arrays with input
body: <p>I'm trying to fill 3 arrays with user input, it should look like this:</p>
  
  <pre><code>Enter account number 1: 29384
  Enter the account balance: 1111
  Enter the account holder last name: lastname
  Enter account number 2: 34938
  Enter the account balance: 2222
  Enter the account holder last name: lastname2
  Enter account number 3: 46372
  Enter the account balance: 3333
  Enter the account holder last name: lastname3
  and so on...
  </code></pre>
  
  <p>I have my program set up with for loops to fill a 5 line array but it asks for all five account numbers first then goes onto the balance and so on</p>
  
  <pre><code>using System;
  public class Array1
  {
      public static void Main()
      {
          int[] scores = new int[5];
          int x;
          string inputString;
          int[] balance = new int[5];
          int y;
  
          for(x=0; x &lt; scores.Length; ++x)
          {
              Console.Write("Enter account number {0} ", x + 1);
              inputString = Console.ReadLine();
              scores[x] = Convert.ToInt32(inputString);
              }
          for(y=0; y &lt; balance.Length; ++y)
          {
              Console.Write("Enter the account balance ");
              inputString = Console.ReadLine();
  
              }
      }
  }
  </code></pre>
  
  <p>I'm sure there is a much better way to write this. Any help would be appreciated.</p>