+ 2
Ruby playground in the application
Hey guys, Iâm new here but seems like ruby playground is not working right. For example i canât use âgetsâ more than once in the code there: a = gets.to_i b = gets.to_i c = gets.to_i d = (a+b+c) / 3 puts 'First number:' + a.to_s puts 'Second number:' + b.to_s puts 'Third number:' + c.to_s puts 'Middle number:' + d.to_s PS: everything is working ok in my command panel. PPS: Thank you very much everyone, the problem is solved.
5 Answers
+ 2
You need to separate inputs on each line. When you have more than one input, you write them in separate lines. Like this:
2
5
6
The code will work if you write them like this.
+ 4
One of the biggest problems of SoloLearn is that it does not allow dynamic inputs. If you need to enter more than one input, you must put them all together in the alert, separated by line breaks.
+ 4
InxaneNinja But the fact of not accepting dynamic inputs, it limits you a lot, besides that makes believe to the new that your code does not work... SoloLearn is adding many improvements, I hope it will improve this system at some point.
+ 2
InvBoy I wouldn't say it's a problem, more like a feature everyone wants yet it's hard to implement. Codes still work fine, indicating it's not a big problem.
+ 2
InvBoy I can safely assume they won't touch anything with how their compilers and inputs work. It's gonna slow everything down a lot, and also they will need more money to keep the servers up.