[0,1,4,5,6,8,9].combination(2){|x| puts x.join(" ") }
Standard input is empty
0 1 0 4 0 5 0 6 0 8 0 9 1 4 1 5 1 6 1 8 1 9 4 5 4 6 4 8 4 9 5 6 5 8 5 9 6 8 6 9 8 9
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!