Sierpinski Carpet by shinh

*s='::'
'1
'.upto(gets){s=(t=s.map{|_|_*3})+s.map{|_|_+' '*_.size+_}+t}
puts s

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page