Created
December 20, 2013 20:13
-
-
Save AndrewGuard/8060701 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
puts "Type a word (or press enter to finish):" | |
word = gets.chomp | |
word_list = [] | |
word_list << word | |
until word == "" | |
puts "Type a word (or press enter to finish):" | |
word = gets.chomp | |
word_list << word | |
end | |
word_list.delete_at(-1) | |
word_list.sort! | |
puts "Congragulations! Your dictionary has #{word_list.count} words!" | |
puts word_list |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment