Created
November 9, 2011 01:16
Revisions
-
gabrielengel revised this gist
Nov 9, 2011 . 1 changed file with 1 addition and 11 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,17 +1,7 @@ (1..10).each do |y| (1..10).each do |x| print (y * x).to_s.rjust(4) print " | " end puts end -
sobrinho created this gist
Nov 9, 2011 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ (1..10).each do |y| (1..10).each do |x| result = y * x if result < 10 print " #{result}" elsif result < 100 print " #{result}" else print result end print " | " end puts end