You want to send an ASCII letter to someone, but you need an envelope to put it in. Your task is to output an envelope given a size as input.
- Given positive integer input
i, your envelope will be
icharacters tall (not counting the top row), and
i*2characters wide (not counting the side columns). In other words, your envelope will be
i+1characters tall and
- Output must be in the form of text, using
- The flap of the envelope must be on the row above the bottom row of the envelope unless impossible (as with an envelope of size 1).
- Trailing whitespace is allowed.
Example input and output:
1 -> __ |\/| 2 -> ____ |\__/| |____| 3 -> ______ |\ /| | \__/ | |______| 4 -> ________ |\ /| | \ / | | \__/ | |________|
This is a code-golf challenge, so shortest code wins!