[Ruby] Growing Stars - Simpler Solution
def display_stars(count)
puts "* "*count
end
def display_growing_stars(times)
[*1..times].each { |t| display_stars(t) }
end
irb(main):001:0> display_growing_stars(5)
*
* *
* * *
* * * *
* * * * *
=> [1, 2, 3, 4, 5]
Comments