Skip to content

Instantly share code, notes, and snippets.

@MrBean83
Last active December 20, 2015 07:49
Show Gist options
  • Save MrBean83/6096158 to your computer and use it in GitHub Desktop.
Save MrBean83/6096158 to your computer and use it in GitHub Desktop.
"Print pretty right triangle"
def print_triangle(rows)
1.upto(rows) { |i| puts "*" * i }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment