Skip to content

Instantly share code, notes, and snippets.

@skout23
Created August 7, 2015 09:56
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 skout23/32724cebd0bb401c3ba7 to your computer and use it in GitHub Desktop.
Save skout23/32724cebd0bb401c3ba7 to your computer and use it in GitHub Desktop.
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