+ 10
I am begginer in Ruby. Can somebody say me how to create user input in Ruby?
3 ответов
+ 1
use gets
while u execute it asks the input for gets
+ 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