I want to enter in a bunch of integers like so:
1 11 2 12 3 13 4 14 5 56 6 80...
How would I get them into an array of int?
Console.WriteLine("Enter in numbers");
string answer = Console.ReadLine();
int[] myArray = new int[answer.Length];
for (int i = 0; i < answer.Length; i++)
{
myArray[i] = answer[i].ToString();
}
The problem with that code is that it doesnt see the space inbetween numbers. Any ideas?