Skip to content

Instantly share code, notes, and snippets.

@fijiaaron
Last active July 10, 2020 21: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 fijiaaron/9284e7adeb770f934779e84635e6f77c to your computer and use it in GitHub Desktop.
Save fijiaaron/9284e7adeb770f934779e84635e6f77c to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
step = "#"
space = "."
level = "\n"
steps = (ARGV.shift || 10).to_i
spaces = steps - 1
loop do
count = 1
loop do
if count <= spaces
putc space
else
putc step
end
if count == steps
break
end
count = count + 1
end
putc level
if spaces == 0
break
end
spaces = spaces - 1
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment