开发者

How can i take input from keyboard with ruby?

开发者 https://www.devze.com 2023-03-30 04:30 出处:网络
How can I take input from 开发者_如何学Ckeyboard with Ruby?Try this: puts \"In which city do you stay?\"

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

精彩评论

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