Christmas Tree by letranger

N=2+gets.to_i
puts"#{z=' '.*N/2}\\ /
#{z[0..-3]}-->*<--"
t=z+'/_\
'
N.times{|i|s=i<1?t:i&1>0?(t[' /']='/_/';t):t.gsub('_/','_\\')
i!=1&&$><<s}
$><<z[0..-2]+"[___]"

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

To protect the system from spam, please input your favorite sport (hint: I believe its name must start with 'g', case insensitive)

download

return to the top page