Skip to content

Instantly share code, notes, and snippets.

@igrabes
Created November 9, 2011 14:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save igrabes/1351571 to your computer and use it in GitHub Desktop.
Save igrabes/1351571 to your computer and use it in GitHub Desktop.
Secret Santa Program
list = Array.new
puts "Please enter all of the people that will be participating in this years Secret Santa"
while true
input = gets.chomp
if input == ''
break
end
list << input
list_count = list.count
end
puts "Here is everyone:"
# Had to define list_count because the shift method only returns the first object
puts list.shift(list_count)
puts "Is that everyone?"
total_question = gets.chomp
if total_question == "yes"
puts "Great Here is the output"
puts "**I NEED TO WRITE THE CODE FOR THIS**"
else
puts "Please enter everyone else that you want to be involved:"
while true
input = gets.chomp
if input == ''
break
end
list << input
end
puts "Here is everyone:"
puts list.shift(list_count)
puts "Is that everyone?"
total_question = gets.chomp
if total_question == "yes"
puts "Great here are the matchups"
puts "**I NEED TO WRITE THE CODE FOR THIS**"
else
puts "sorry but you need to come back when you get your shit together"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment