Gistlib Logo

gistlib

other ruby categories

matrix code snippets in ruby

create a matrix in ruby
write a 2x3 integer-based matrix in ruby, and then show how to reverse it so that 1 2 3 in row 1, becomes 3 2 1, and 4 5 6 in row two becomes 6 5 4 in ruby

gistlibby LogSnag