Skip to content

Instantly share code, notes, and snippets.

@skout23 skout23/mario.rb
Created Aug 7, 2015

Embed
What would you like to do?
quick poc to print out the mario half pyramid
#!/usr/bin/env ruby
#
# quick poc to print out the mario half pyramid
#
#
def pymid(base)
1.upto(base) do |row|
str = "#" * row
puts "#{str}#\n".rjust($height + 2)
end
end
$height = ARGV[0].to_i
pymid($height)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.