+ 1

How do we store user input?

11th Feb 2017, 10:37 PM
Emmanuel Nuotah
6 Respostas
+ 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.
11th Feb 2017, 10:48 PM
Benneth Yankey
Benneth Yankey - avatar
0
name = gets.chomb print name
11th Feb 2017, 10:45 PM
Hasan Al-Yazidi
Hasan Al-Yazidi - avatar
0
hassan gets.chomp only takes user input
11th Feb 2017, 11:37 PM
Emmanuel Nuotah
0
to really store user input we have to give it a return value
11th Feb 2017, 11:38 PM
Emmanuel Nuotah
0
x = gets puts x
19th Feb 2017, 4:17 PM
Drago Blackfire
Drago Blackfire - avatar
0
just name = gets.chomp
28th Mar 2017, 11:07 PM
salman