KillerDesigner
10/6/2013 - 1:57 AM

contactlist.rb

puts "would you lke to start a contact list?"
response = gets.chomp
hash = {}

while response == "y"
  puts "give me name"
  name = gets.chomp
  puts "number"
  number = gets.chomp
  hash[name] = number
  puts "continue? y/n"
  response = gets.chomp
    while response != "y" && response != "n"
      puts "enter y/n"
      response = gets.chomp
    end
end

print hash