+ 1
How do we store user input?
6 Answers
+ 3
The only storage box in every language AFAIK is variable. You just have to assign the input value to a variable.
e.g
name = input ("enter your name")
This stores the value entered by the user in the variable box, name.
0
name = gets.chomb
print name
0
hassan gets.chomp only takes user input
0
to really store user input we have to give it a return value
0
x = gets
puts x
0
just
name = gets.chomp