int[] tablica = Console.ReadLine().Split(new char[] { ' ' });//of course doesn't work
it works if instead int[] there is string[], but is it possible to take ints by readline in one line?Thanks for any help!
int[] tablica = Console.ReadLine().Split(new char[] { ' ' });//of course doesn't work
it works if instead int[] there is string[], but is it possible to take ints by readline in one line?|
|
|
int[] array = (from s in Console.ReadLine().Split(new char[] { ' ', '\t' }, StringSplitOptions.RemoveEmptyEntries) select int.Parse(s)).ToArray();
0 members, 1 guests, 0 anonymous users