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.
Rules:
- Given positive integer input
i
, your envelope will bei
characters tall (not counting the top row), andi*2
characters wide (not counting the side columns). In other words, your envelope will bei+1
characters tall and(i*2)+2
characters wide. - Output must be in the form of text, using
\
,/
,_
,|
, and - 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!