From: Chuck Brotman Date: 2005-06-19T04:50:34+09:00 Subject: Newbe questions... In Ruby Is there a prefered (or otherwise elegant) way to do an inner & outer loop with two variables? eg in psedocode: for i=1 to 3 {for j = 4 to 6 print i,j, i*j,\nl} would print something like 1,4,4 1,5,5 1,6,6 2,4,8 2,5,10 2,6,12 3,4,12 3,5,15 3,6,18 Also,how would you generate the same output using the each iterator? Thanks, Chuck