Created
April 3, 2015 14:47
-
-
Save JFFail/c286e62461d301d28c78 to your computer and use it in GitHub Desktop.
Solution To Reddit Daily Programmer #208 - Culling Duplicate Numbers
This file contains hidden or 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
#!/usr/bin/ruby | |
#Reddit Daily Programmer 208 | |
#http://www.reddit.com/r/dailyprogrammer/comments/30ubcl/20150330_challenge_208_easy_culling_numbers/ | |
puts "Enter your numbers." | |
print "> " | |
input = $stdin.gets.chomp | |
input_array = input.split(" ") | |
#Get the unique values. | |
uniques = input_array.uniq | |
puts uniques.join(" ") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment