Hi Everyone,

Here is the code I currently have:

contacts = Hash.new

x = 0
y = 0

if x <= 5
    puts "What contact would you like to add?"
    ui = gets.chomp
    contacts.store(y, ui)
    puts "Contact added is #{contacts}"
    x += 1
    y += 1
    puts "X is #{x}, Y is #{y}" # so I know if the values are being 
incremented
else
    puts "You've reached the maximum # of contacts."
end

Also, how can I print a hash to the console without a key value? 

Thank you

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/29af2e20-ff2c-4bd0-a740-2932b9575502%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to