#!/usr/bin/ruby

#
## http://rosettacode.org/wiki/Loops/Nested
#

var arr = 10.of{ 10.of{ 20.irand + 1 } };
 
for (arr) { |row|
    for (row) { |num|
        "%3d".printf(num);
        num == 20 && goto 'END';
    };
    print "\n";
};
@:END;
 
print "\n";
