box-o-sand/lrthw-remnants/ex14.rb
Dan Buch 01e5a4e45f Add 'lrthw-remnants/' from commit '2b0a814a1795c60baf29b95462921b0ec8c7d861'
git-subtree-dir: lrthw-remnants
git-subtree-mainline: f2380eef05
git-subtree-split: 2b0a814a17
2013-01-09 23:47:30 -05:00

23 lines
512 B
Ruby

user = ARGV.first
prompt = '> '
puts "Hi #{user}, I'm the #{$0} script."
puts "I'd like to ask you a few questions."
puts "Do you like me #{user}?"
print prompt
likes = STDIN.gets.chomp()
puts "Where do you live #{user}?"
print prompt
lives = STDIN.gets.chomp()
puts "What kind of computer do you have?"
print prompt
computer = STDIN.gets.chomp()
puts <<MESSAGE
Alright, so you said #{likes} about liking me.
You live in #{lives}. Not sure where that is.
And you have a #{computer} computer. Nice.
MESSAGE