0
How can I collect the input for the code Coach challenges using Ruby?
I'm trying to collect the input using input= gets.chomp.to_i But that method is only getting the first input and it's dismissing the remaining Ex of input: 5 6 9 3 My output : 5 How do i handle that?
1 Answer
- 2
You shoud input all the input data at the same time.
first input <space> Second input and so on
example: 10 8 9 ...