开发者

How can i take input from keyboard with ruby?

How can I take input from 开发者_如何学Ckeyboard with Ruby?


Try this:

puts "In which city do you stay?"  
STDOUT.flush  
city = gets.chomp  
puts "The city is " + city  
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜