I keep getting an error and I have no idea why, someone please tell me why this doesn't work. It not only does it give me an error but it fails to store the second input into userInput[1].
string[] name = new string[4];
double[] bankAccount = new double[4];;
int x;
for (x = 0; x <= name.Length; x++)
{
Console.Write("Please enter first Name and their bank status: ");
string[] userInput = Console.ReadLine().Split();
name[x] = userInput[0];
bankAccount[x] = double.Parse(userInput[1]);
Console.WriteLine(userInput[0], userInput[1]);
}