+ 10

I am begginer in Ruby. Can somebody say me how to create user input in Ruby?

16th Dec 2016, 2:19 PM
Aydin
3 ответов
+ 1
use gets while u execute it asks the input for gets
24th Dec 2016, 6:55 AM
Naveenkumar
Naveenkumar - avatar
+ 1
for example: name = gets.chomp #chomp is used so that statement cant be breaked puts "Hello My friend, #{name}" #if you input Harry #output will be: #Hello My friend, Harry
25th Jan 2017, 4:51 AM
MrCoder
MrCoder - avatar