Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # str = (0 .. 15).each_with_index.map do |item, index|
- # ("%04b" % item).tr("01", " #") +
- # (index % 4 == 3 ? "\n" : "|")
- # end.join
- # puts str
- # # outputs:
- # # | #| # | ##
- # # # | # #| ## | ###
- # # # |# #|# # |# ##
- # # ## |## #|### |####
Add Comment
Please, Sign In to add comment