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?

17th Apr 2020, 6:55 AM
Trésor Bi
Trésor Bi - avatar
1 Odpowiedź
- 2
You shoud input all the input data at the same time. first input <space> Second input and so on example: 10 8 9 ...
17th Apr 2020, 12:19 PM
Md Rayhan Kabir
Md Rayhan Kabir - avatar