Skip to content

Instantly share code, notes, and snippets.

@hodgesmr
Created February 21, 2013 20:34
Show Gist options
  • Save hodgesmr/5007973 to your computer and use it in GitHub Desktop.
Save hodgesmr/5007973 to your computer and use it in GitHub Desktop.
Print all possible 4-digit PINs
(0..9).each { |h| (0..9).each { |i| (0..9).each { |j| (0..9).each { |k| print "#{h}#{i}#{j}#{k}\n"}}}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment