I need help splitting this string, but i can’t seem to come with the right way of doing it.
Suppose I have two numbers on a line
12 101
I would like to take the first and assign it to variable, and then take the second and assign it to a variable, this may sounds easy, but for me i can’t come up with the right way to do it?
Split the string on space which will give you an array of strings that can be stored in two variables. If necessary, you can convert them to ints as shown below: