Now, I'm programming by Free Basic and I'm looking for a way to get values of an array in a single line.
For example, if I want to get 2 integers of an array in a single line, I write this:
Dim a(2) as integer
Input a(1),a(2)
But my program should get Array length from user.
This is my program:
dim length as integer
input "Enter Array length: ",length
dim a(length) as integer
dim i as integer
for i=1 to length
input a(i)
next
'OTHER CODES...
But this program gets Array values in multi lines. The problem is exactly here. I want to take it in a single line but I don't know that "What I should to do?"
Can anyone help me, please?