Skip to content

Instantly share code, notes, and snippets.

@MiriamNeubauer
Forked from tmehta2442/contactlist.rb
Created November 4, 2013 02:49
Show Gist options
  • Select an option

  • Save MiriamNeubauer/7297439 to your computer and use it in GitHub Desktop.

Select an option

Save MiriamNeubauer/7297439 to your computer and use it in GitHub Desktop.
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment