Skip to main content
5 of 7
diminishing returns

Ruby - 139 129 126 123


(0..9).map{|i|(i*3...(i+1)*4).map{|j|puts"/#{'**'*j}\\".rjust(82+j,' ')}}
puts"%86s\n"%'|--------|'*11+'%86s'%'|________|'

Ungolfed:


# print fill patterns from the intervals
# [0..3, 3..7, 6..11, 9..15, 12..19, 15..23, 18..27, 21..31, 24..35, 27..39]
# centered on columns 81-82
(0..9).each { |i|
  (i*3...(i+1)*4).each { |j|    # x...y vs x..y-1 saves a char
    puts "/#{'**'*j}\\".rjust(82+j,' ')
  }
}
# print the stump
puts ("%86s\n" % '|--------|') * 11
puts '%86s' % '|________|'