Skip to content

Instantly share code, notes, and snippets.

@janlelis
Created November 29, 2009 23:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save janlelis/245116 to your computer and use it in GitHub Desktop.
Save janlelis/245116 to your computer and use it in GitHub Desktop.
# christmas tree (golfed version): http://www.ruby-mine.de/2009/11/22/weihnachten
puts"Grösse?"
(Z.times{|n|0.upto(Z){puts" "*(2*Z-n)+"*%d"%(n+=1)*n}
$*<<"%#{2*Z+2}s"%:II}
puts$*)if 0<Z=gets.to_i
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment