Skip to content

Instantly share code, notes, and snippets.

@yangchenyun
Created April 10, 2013 02:12
Show Gist options
  • Save yangchenyun/5351199 to your computer and use it in GitHub Desktop.
Save yangchenyun/5351199 to your computer and use it in GitHub Desktop.
[1, 2, 3].each do |n1|
if n1 == 1
[1, 2, 3].each do |n2|
if n2 == 2
[1, 2, 3].each do |n3|
if n3 == 3
[1, 2, 3].each do |n4|
if n4 == 4
print n1, n2, n3, n4
end
end
end
end
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment