+ 1

User input

Does Ruby allow user input ?

7th May 2018, 2:27 AM
Anil/Anant/1949Nov
Anil/Anant/1949Nov - avatar
4 ответов
+ 2
gets example: name = gets puts name
7th May 2018, 2:35 AM
LordHill
LordHill - avatar
+ 2
yes. x=gets ..... that will take user input and store it as a variable called x puts x ........ that will print the variable you stored to the screen.
7th May 2018, 2:37 AM
LordHill
LordHill - avatar
+ 2
yes thank you
7th May 2018, 2:37 AM
Anil/Anant/1949Nov
Anil/Anant/1949Nov - avatar
+ 1
"x=gets puts x" will give output = user input ?
7th May 2018, 2:36 AM
Anil/Anant/1949Nov
Anil/Anant/1949Nov - avatar