[Question]
  [
Draw an ASCII-art rainbow!
# Input
An integer between 0 and 1000, inclusive.
# Examples
Input 0:
```
/\
||
```
Input 1:
```
 _
/ \
| |
```
Input 2:
```
 __
/  \
|  |
```
Input 3:
```
 ___
/   \
|   |
```
The first row is a space followed by *n* underscores.
The second row is a slash followed by *n* spaces, and a backslash.
The third row is a pipe followed by *n* spaces, and a pipe.
Trailing spaces are allowed.
This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"). Shortest code wins.
  
[Answer]
# i386 (16-bit mode) Bootsector, 512 bytes
All i386 bootsectors have to be 512 bytes, so... Without the padding required by i386, it is 137 bytes. Since I can't easily post a TIO link, here's a screenshot of it running:
[![enter image description here](https://i.stack.imgur.com/TEUjh.png)](https://i.stack.imgur.com/TEUjh.png)
This code registers the BIOS interrupt `int 0x69` to take the number in the `bx` register and use it as input. Thus, doing
```
mov bx, 3
int 0x69
```
is equivalent to the last test case. The disassembled, Intel-syntax source is:
```
[org 0x7c00]
xor ax, ax
mov es, ax
cli
mov dx, interrupt
mov [es:0x69*4], dx
mov ax, cs
mov [es:0x69*4+2], ax
sti
xor bx, bx
int 0x69
call newline
mov bx, 1
int 0x69
call newline
mov bx, 2
int 0x69
call newline
mov bx, 3
int 0x69
cli
hlt
interrupt:
or bx, bx
jz special
push bx
mov ax, 0x0e20
int 0x10
mov al, '_'
.loop1:
int 0x10
dec bx
jnz .loop1
call newline
mov al, '/'
int 0x10
mov al, ' '
pop bx
push bx
.loop2:
int 0x10
dec bx
jnz .loop2
mov al, '\'
int 0x10
call newline
mov al, '|'
int 0x10
pop bx
mov al, ' '
.loop3:
int 0x10
dec bx
jnz .loop3
mov al, '|'
int 0x10
iret
newline:
mov ax, 0x0e0d
int 0x10
mov al, 0x0a
int 0x10
ret
special:
mov si, s
mov ah, 0x0e
.sloop:
lodsb
int 0x10
or al, al
jnz .sloop
iret
s: db '/', '\', 10, 13, '|', '|'
times 510-($-$$) db 0
dw 0xaa55
```
(Bit verbose, I know, but hey, it's assembly.)
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), 11 bytes
```
↑|↗/×_Ｎ¶\¶|
```
[Try it online!](https://tio.run/##S85ILErOT8z5/z@gKDOvRMMqtEBHQalGSdOaCy4QlJmeUQIU1UeIhmTmphZrKMUr6Sh45hWUlviV5ialFmloasJVKMXkxcTE5IFM@v/f0OC/blkOAA "Charcoal – Try It Online") Link is to verbose version of code. This shape is too simple to tax Charcoal's drawing primitives, so this is just basically printing strings to the canvas. Explanation:
```
↑|
```
Print the left `|` and move the cursor up a line.
```
↗/
```
Print the `/` and move the cursor to the start of the `_`s.
```
×_Ｎ
```
Print the desired number of `_`s. This leaves the cursor just to the right of the last `_`.
```
¶\¶|
```
Move down a line, print a `\`, and print a `|` directly beneath.
Just for fun I thought I'd write a 25-byte version which allows you to vary the height and thickness too:
```
ＮθＮηＵＯηＮ|↑Ｇ→↑η/↗ＵＯθη_‖ＢＯθ
```
[Try it online!](https://tio.run/##S85ILErOT8z5/98zr6C0xK80Nym1SKNQ05oLmZ8B5Psn5eTnpWtk6Cggy2jqKCjVKAGlffPLUjWsQguAzID8nMr0/DwNq6DM9IwSHQWgqI4CUJ@SPrJCsCTC3EKIkniQkqDUtJzU5BKn0pKS1KK0nEr/stSinMQCkLP@/zc0UDBXMPmvW5YDAA "Charcoal – Try It Online") Link is to verbose version of code. Takes input as inner width, thickness and inner height. Note that Charcoal does not support zero-sized boxes, so all of the inputs need to be at least `1`.
[Answer]
# [Rust](https://www.rust-lang.org/), ~~76~~ ~~57~~ ~~53~~ ~~51~~ 45 bytes
-4 bytes thanks to madlaina
```
|n|print!(" {:_<1$}
/{0:1$}\\
|{0:1$}|","",n)
```
[Try it online](https://tio.run/##JY7BCoMwEETv@xVj6GED1tpDLyoe/Qqh9BBpoN2WGCnU5NvTaE8zs7Bvxi2zT5PgebPCGisB3syeU5DwdlZ8wQprc@3Oh0intW6yjiOFvwuqVKoUnQDdUiTKpO29G3qeGgyaPnfjTIYOOQkvs/0ajWMP1rR1TS8HgRXUVXXZ2/ONJcM2tw94SMF7jhTTDw)
---
Old answer (76 bytes):
```
|n|format!(" ")+&"_".repeat(n)+"
/"+&" ".repeat(n)+"\\
|"+&" ".repeat(n)+"|"
```
[Try it online](https://tio.run/##dc49DsIwDAXg3acwHpCt8j8C6tgLsFZCHRKoRNMqdYVE07OHdETAZn/De88PvUbrsKlqx4IjIKrplWNwwba@qXTBhCTZkq608aYzlbKTjGBLyfDDyhLCtwaKiHKCCSAVzennImd7xELgeTfepM4ifY6Hvn4ZwXWOF/W1u8E8p0uXPlyaMU60Qss7SWE/fP/HD7NP8Q0)
Just the boring answer. Borrows are needed [to satisfy the type checker](https://doc.rust-lang.org/std/string/struct.String.html#impl-Add%3C%26%27_%20str%3E), unfortunately.
[Answer]
# [APL (Dyalog Unicode)](https://www.dyalog.com/), 21 [bytes](https://codegolf.meta.stackexchange.com/a/9429/43319 "When can APL characters be counted as 1 byte each?") ([SBCS](https://github.com/abrudz/SBCS ".dyalog files using a single byte character set"))
Full program, prompting for `n` from stdin.
```
' /|',' \|',⍨3↑1⎕⍴'_'
```
[Try it online!](https://tio.run/##SyzI0U2pTMzJT///qKO94L@6gn6Nuo66QgyQfNS7wvhR20TDR31TH/VuUY9XByn5rwAGBVwGXDCWIZxlBGcZI2QNDAy4AA "APL (Dyalog Unicode) – Try It Online")
`'_'` an underscore
`1⎕⍴'_'` cyclically reshaped into a matrix with one row and *n* columns
`3↑` take the first three rows, padding with spaces
`' \|',⍨` append this character-list as a trailing column
`' /|',` prepend this character-list as a leading column
[Answer]
# [Python 2](https://docs.python.org/2/), 47 bytes
```
lambda n:" %s\n/%s\\\n|%s|"%("_"*n," "*n," "*n)
```
[Try it online!](https://tio.run/##K6gsycjPM/qfZhvzPycxNyklUSHPSklBtTgmTx9IxMTk1agW1yipaijFK2nl6SgpwEnN/2n5RQp5Cpl5CgY6hjpGOsZWXAoFRZl5JQppGkBZAA "Python 2 – Try It Online")
Inserting the `n`-dependent components into a template using string formatting.
---
**48 bytes**
```
lambda n:" "+"_"*n+"\n/"+" "*n+"\\\n|"+" "*n+"|"
```
[Try it online!](https://tio.run/##K6gsycjPM/qfZhvzPycxNyklUSHPSklBSVspXkkrT1spJk8fyFaAsGNi8mrgvBql/2n5RQp5Cpl5CgY6hjpGOsZWXAoFRZl5JQppGnma/wE "Python 2 – Try It Online")
Straight up concatenation.
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), ~~26~~ 21 bytes
### My original 26 bytes approach:
```
" 0 /1\|1|"3ô„_ vy¹иJNs:}»
```
Explanation:
```
" 0 /1\|1|"3ô„_ vy¹иJNs:}»
" 0 /1\|1|"                   push string template (the idea is to replace 0 and 1 with _ and space respectively using loop count index
           3ô                 split by chunks of 3
             „_               push 2 chars _ and space
               v        }     for each character in the previous string
                y¹и           repeat it by the number in input
                   J          join the new string
                    Ns        push the index before that string to easily replace
                      :       replace in the string template
                         »    join by new lines
```
[Try It Online](https://tio.run/##yy9OTMpM/f9fScFAQd8wpsawRsn48JZHDfPiFcoqD@28sMPLr9iq9tDu//9NAA)
### 21 bytes (@KevinCruijssen comments):
```
„_ S×ā" 1/2|2"2ô.º»r‡
```
[Try It Online](https://tio.run/##ASkA1v9vc2FiaWX//@KAnl8gU8OXxIEiIDEvMnwyIjLDtC7CusK7cuKAof//NA)
[Answer]
# [C (gcc)](https://gcc.gnu.org/), ~~72~~ 70 bytes
-2 bytes thanks to ceilingcat!
```
f(n){printf(" %s\n/%*c\n|%*2$c",memset(calloc(n,2),95,n),n+1,92,'|');}
```
[Try it online!](https://tio.run/##FYtBCoMwEEXX5hRDqDhjR0oDLUjoTdzIYEpAR1G7Us@e6urz3uNL9RVJKaDSNs1R14AW8qXRR15Ko3teuptYHrph6VaUtu9HQWVHXL9YifX@5NpxsRfkj3T@YWijIpnNZGGcAS8V4QNvD7GqPJDJzpQFjOTPnX7rgrZRe9FhjvQH "C (gcc) – Try It Online")
[Answer]
# [MAWP 1.1](https://esolangs.org/wiki/MAWP), 95 bytes
```
%@~52WWM52WWM52WWM84W;![1A99M1M5W;]%52W;68W1A;![1A84W;]%68W2W4A;52W;56W1M4W;![1A84W;]%56W1M4W;.
```
[Try it!](https://8dion8.github.io/?code=%25%40%7E52WWM52WWM52WWM84W%3B!%5B1A99M1M5W%3B%5D%2552W%3B68W1A%3B!%5B1A84W%3B%5D%2568W2W4A%3B52W%3B56W1M4W%3B!%5B1A84W%3B%5D%2556W1M4W%3B.&input=0012)
Explanation:
```
%                  Remove initial 1 from stack
@~                 Push input as integers and reverse stack
52WWM              Add top of stack multiplied by 10 to second 
                   stack element  [5,4,3,2] ==> [5,4,23]
52WWM52WWM         Two more times [5,4,3,2] ==> [2345]
84W;               Print a space (8*4=32)
!                  Duplicate top of stack
[                  Start of loop
1A                 Subtract 1
99M1M5W;           Print an underscore ((9+9+1)*5=95)
]                  End of loop. If result from subtraction doesn't 
                   equal to 0 jump to start of loop
%                  Remove 0
52W;               Print a newline (5*2=10)
68W1A;             Print a slash (6*8-1=47)
![1A84W;]%         Do the same loop as before but printing spaces instead
68W2W4A;           Print a backslash (6*8*2-4=92)
52W;               Print a newline
56W1M4W;           Print a pipe ((5*6+1)*4=124)
![1A84W;]%         Same loop as second
56W1M4W;           Print a pipe
.
```
[Answer]
# [Integral](https://github.com/nph278/integral), ~~37~~ 31 Bytes
```
♂8♦⌡_⌡g►⌡/⌡•8g►⌡\⌡►•⌡|⌡♦8g►⌡|⌡►
```
First real answer in my new language!
[Try it](https://nph278.github.io/integral?code=CzgE9V/1ZxD1L/UHOGcQ9Vz1EAf1fPUEOGcQ9Xz1EA&input=0%250A%250A1%250A%250A2%250A%250A3)
Explanation:
```
(Implicit input)
♂      Triplicate top of stack
8      Push space
♦      Swap
⌡_⌡    Push underscore
g      Repeat string
►      Concatenate
⌡/⌡    Push slash
•      Stack: ...abc -> ...bca
8      Push space
g      Repeat string
►      Concatenate
⌡\⌡    Push backslash
•      Stack: ...abc -> ...bca
⌡|⌡    Push pipe
♦      Swap
8      Push space
g      Repeat string
►      Concatenate
⌡|⌡    Push pipe
►      Concatenate
```
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E/wiki/Commands), ~~18~~ 17 [bytes](https://github.com/Adriandmen/05AB1E/wiki/Codepage)
```
…_  ε×… /|NèºSsý,
```
[Try it online](https://tio.run/##yy9OTMpM/f//UcOyeAWFc1sPTweyFPRr/A6vOLQruPjwXp3//43/6@rm5evmJFZVAgA) or [verify a few more test cases](https://tio.run/##yy9OTMpM/W96bJKSZ15BaYmVgpK936GVtlxK/qUlEL7O/0cNy@IVFM5tPbTu8HQgW0G/xu/wikO7gosP79X5X3tom/3//7q6efm6OYlVlQA).
**Explanation:**
```
…_                 # Push string "_  "
    ε              # Map over each character in this string:
     ×             #  Repeat it the (implicit) input amount of times as string
      … /|         #  Push string " /|"
          Nè       #  Use the map-index to index into this string
            º      #  Mirror the character (" "→"  "; "/"→"/\"; "|"→"||")
             S     #  Convert the string to a pair of characters
              s    #  Swap so the "_"/" "-string is at the top of the stack
               ý   #  Join the pair with this string as delimiter
                ,  #  And output it with trailing newline
```
[Answer]
# [MATL](https://github.com/lmendo/MATL), 20 bytes
```
' /|'4i:)B95*' \|'v!
```
[Try it online!](https://tio.run/##y00syfn/X11Bv0bdJNNK08nSVEtdIaZGvUzx/39zAA "MATL – Try It Online")
### How it works
```
' /|'   % Push this string: first column of the output, but as a row (*)
4       % Push 4
i:)     % Implicitly input n; range; modular indexing. This gives a row vector
        % [4 4 ... 4] of length n
B       % Convert to binary. Each number gives a row in the output. So this
        % produces the matrix [1 0 0; 1 0 0; ...; 1 0 0] with n rows
95*     % Multiply each entry by 95 (ASCII code of '_'). This gives the central
        % columns of the output, but transposed, as an n×3 matrix (**)
' \|'   % Push this string: last column of the output, but as a row (***)
v       % Concatenate (*), (**) and (***) vertically
!       % Transpose. Implicitly display
```
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 19 [bytes](https://github.com/DennisMitchell/jelly/wiki/Code-page)
```
“_  ”×“  “/\“||”j"Y
```
A full program accepting a non-negative integer which prints the resulting ASCII art.
**[Try it online!](https://tio.run/##y0rNyan8//9Rw5x4BYVHDXMPTwcyQaw5@jFAoqYGKJalFPn//39TAA "Jelly – Try It Online")**
### How?
```
“_  ”×“  “/\“||”j"Y - Main Link: integer, n (e.g. 3)
“_  ”               - list of characters = ['_', ' ', ' ']
     ×              - multiply -> ['___', '   ', '   '] (now strings, a bit of a hack in Jelly)
      “  “/\“||”    - list of lists of characters = [[' ', ' '], ['/', '\'], ['|', '|']]
                 "  - zip together applying:
                j   -   join -> [[' ', '___', ' '], ['/', '   ', '\'], ['|', '   ', '|']]
                  Y - join with newlines -> [' ', '___', ' ', '\n', '/', '   ', '\', '\n', '|', '   ', '|']
                    - implicit, smashing print
                      >>> ___ 
                      >>>/   \
                      >>>|   |
```
[Answer]
# JavaScript (ES8), 50 bytes
```
n=>` ${'_'.repeat(n)}
/${s=''.padEnd(n)}\\
|${s}|`
```
[Try it online!](https://tio.run/##y0osSyxOLsosKNHNy09J/Z9m@z/P1i5BQaVaPV5dryi1IDWxRCNPs5ZLX6W62FZdXa8gMcU1LwUkFBPDVQMUrK1J@J@cn1ecn5Oql5OfrpGmYaCpyYUqYoghYoQhYqyp@R8A "JavaScript (Node.js) – Try It Online")
---
# JavaScript (ES6), 50 bytes
```
n=>' '+`_
/ \\
| |`.replace(/_| /g,c=>c.repeat(n))
```
[Try it online!](https://tio.run/##Zcy7CoAgFADQ3a9wS6m0x2xfIpjcblGIhkWT/241RusZzmYve0Bc97P2YcI8q@zVUNCiHA2RVGuSaBpFxN1ZQCZNonKpQA3wGtqTec4zBH8Eh8KFhc2s4Zx8pf1J95P@eW4 "JavaScript (Node.js) – Try It Online")
[Answer]
# [Pyth](https://github.com/isaacg1/pyth), 24 bytes
```
%" %s
/%s\\
|%s|"*RQ"_  
```
[Try it online!](https://tio.run/##K6gsyfj/X1VJQbWYS1@1OCaGq0a1uEZJKyhQKV5B4f9/43/5BSWZ@XnF/3VTAA "Pyth – Try It Online")
## Explanation
```
%"..."*RQ"_
         "_    : The string literal "_  "
      *RQ      : Multiply each element of the string by input (["___", "   ", "   "])
%"..."         : Do string formating on string with args from previous comamnd
```
[Answer]
# [Japt](https://github.com/ETHproductions/japt), 20 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)
```
" {ç'_}
/{ç}\\
|{ç}|
```
[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=IiB75ydffQove%2bd9XFwKfHvnfXw&input=Mw)
`ç` is one of Japt's `repeat` methods for integers; you can probably figure the rest out from there!
[Answer]
# [PowerShell](https://github.com/TryItOnline/TioSetup/wiki/Powershell), ~~43~~ 41 bytes
-2 bytes thanks to mazzy
```
param($n)' '+'_'*$n
' '*$n|%{"/$_\
|$_|"}
```
[Try it online!](https://tio.run/##K8gvTy0qzkjNyfmvkmZb/b8gsSgxV0MlT1NdQV1bPV5dSyWPC8gEUjWq1Ur6KvExXDUq8TVKtf9ruQz09AwNgMIq8dZqKmkKQEpdvfY/AA "PowerShell – Try It Online")
Eh, it's ~~okay~~slightly better
[Alternative 41 byte solution offered by mazzy](https://tio.run/##K8gvTy0qzkjNyfmvkmZb/V8lsSi9uEa1Wl1BXVs9Xl1LJZ4LyARSQDElfZX4GK4aIFuptvZ/LZeBnp6hAVBcJd5aTSVNAUipq9f@BwA "PowerShell – Try It Online")
[Answer]
# Java 11, 61 bytes
```
n->" "+"_".repeat(n)+"\n/x\\\n|x|".replace("x"," ".repeat(n))
```
[Try it online.](https://tio.run/##dY9NDoJADIX3nKKZ1UwQdOMK8QaycekYM8JoBqEQGAhGODuWn8SVmybte339mqpWeWnyGuNM1TWclMGPA2DQ6uqhYg3R1AKcbWXwCTEnBVAENBwcKrVV1sQQAUI4ondkwFx2Y36lS60sR@EyidtOSol918/zjGI569iGvD@fGIMpr2zuGeWtsW1hEsiJiS/3L1dQYgF6FNXMYsJdAOYQ7qm67ioS77u2OveLxvolbdoMOfpEL2b0P45VG@bnhvEL)
**Explanation:**
```
n->                  // Method with integer parameter and String return-type
  " "                //  Return a space
  +"_".repeat(n)     //  Appended with the input amount of "_"
  +"\n/x\\\n|x|"     //  Appended with "
                     //   /x\
                     //   |x|",
   .replace("x",     //  of which the "x" are replaced with:
     " ".repeat(n))  //   The input amount of spaces
```
[Answer]
# [Python 3](https://docs.python.org/3/), 41 bytes
```
lambda n:(f" /|{'_  '*n} \\|\n\n"*3)[::3]
```
[Try it online!](https://tio.run/##K6gsycjPM/6fZhvzPycxNyklUSHPSiNNSUG/plo9XkFBXSuvViEmpiYmLyZPSctYM9rKyjj2f0FRZl6JRpqGhabmfwA "Python 3 – Try It Online")
How could I forget about f-strings?
---
# [Python 3](https://docs.python.org/3/), 43 bytes
```
lambda n:(" /|%s \\|\n\n"%("_  "*n)*3)[::3]
```
[Try it online!](https://tio.run/##K6gsycjPM/6fZhvzPycxNyklUSHPSkNJQb9GtVghJqYmJi8mT0lVQyleQUFJK09Ty1gz2srKOPZ/QVFmXolGmoaFpuZ/AA "Python 3 – Try It Online")
Constructs the string transposed, then transposes it using modular arithmetic.
[Answer]
# [COW](https://bigzaphod.github.io/COW/), 420 bytes
```
MoOMoOMoOMoOMoOMoOMoOMMMMoOMoOMoOmoOMMMMOOMMMMOOmoOMoOmOoMOomooMMMMOomoooommoOMoOMoOMoOMoOMooMMMmoOMMMMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMMMMOOmoOMoOMoOMOOmoOMoOmOoMOomoomOoMOomooMMMmoOmoOMMMmOoMMMMoOmOomOomOoMMMMOOmoOmoOmoOMoomOomOomOoMOomooMMMmOoMoomoOmoOmoOMoomOomOoMMMMOOmoOMoomOoMOomoomoOmoOmoOMOoMOoMOoMoomOomOomOomOoMoomoOMMMmoOMMMMOOmoOmoOMoOmOomOoMOomooMMMmoOmoOMMMMoomOomOomOoMOOmoOMoomOoMOomooMMMMoo
```
[Try it online!](https://tio.run/##jVBbDsAgCDvUzmE4xL5JP3d8xkMFdR8zxNRaWvTGI9JAH6VrYI4j9Z2DJDQCA04aAJh3H7vl1e1XlSCrI7Sm85jQSA9SEDV9ugbIq9muWPlDU2ZIfcqcadFLxdY1@WqatrTnzo9dptoTQyByvQ "COW – Try It Online")
Pretty happy with 140 instructions (3 bytes per instruction) considering that the ASCII values of the six required characters sum to 400.
### Commented
```
MoOMoOMoOMoOMoOMoOMoO # push 7 to 1st memory block 						blocks: [[7]], register: nil
MMM		      # copy to register 							blocks: [[7]], register: 7
MoOMoOMoO	      # add 3 to 1st block 							blocks: [[10]], register: 7
moOMMM		      # paste 7 to 2nd block							blocks: [10, [7]], register: nil
MOOMMMMOOmoOMoOmOoMOomooMMMMOomoo # set 3rd block to 28 = 7 + 6 + 5 + 4 + 3 + 2 + 1		blocks: [10, [0], 28], register: nil
oom		      # read input n (e.g. 3) into 2nd block					blocks: [10, [3], 28], register: nil
moOMoOMoOMoOMoO	      # add 4 to 3rd block							blocks: [10, 3, [32]], register: nil
Moo		      # print ASCII character 32 (space)					blocks: [10, 3, [32]], register: nil
MMMmoOMMM	      # copy and paste 32 to 4th block						blocks: [10, 3, 32, [32]], register: nil
MoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoOMoO # add 15 to 4th block				blocks: [10, 3, 32, [47]], register: nil
MMMMOOmoOMoOMoOMOOmoOMoOmOoMOomoomOoMOomooMMM # add 2 to 6th block 47 times			blocks: [10, 3, 32, [47], 0, 94], register: nil
moOmoOMMMmOoMMM	      # copy and paste 94 to 5th block						blocks: [10, 3, 32, 47, [94], 94], register: nil
MoO		      # add 1 to 5th block							blocks: [10, 3, 32, 47, [95], 94], register: nil
mOomOomOoMMMMOOmoOmoOmoOMoomOomOomOoMOomooMMM # print ASCII character 95 (underscore) n times	blocks: [10, [3], 32, 47, 95, 94], register: nil
mOoMoo		      # print ASCII character 10 (newline)					blocks: [[10], 3, 32, 47, 95, 94], register: nil
moOmoOmoOMoo	      # print ASCII character 47 (forward slash)				blocks: [10, 3, 32, [47], 95, 94], register: nil
mOomOoMMMMOOmoOMoomOoMOomoo # print n spaces							blocks: [10, [0], 32, 47, 95, 94], register: 3
moOmoOmoOMOoMOoMOo    # subtract 3 from 5th block						blocks: [10, 0, 32, 47, [92], 94], register: 3
Moo		      # print ASCII character 92 (backslash)					blocks: [10, 0, 32, 47, [92], 94], register: 3
mOomOomOomOoMoo	      # print newline								blocks: [[10], 0, 32, 47, 92, 94], register: 3
moOMMMmoOMMMMOOmoOmoOMoOmOomOoMOomooMMM # add 32 to 5th block					blocks: [10, 3, [32], 47, 124, 94], register: nil
moOmoOMMM             # copy 124 to register							blocks: [10, 3, 32, 47, [124], 94], register: 124
Moo	              # print ASCII character 124 (pipe)					blocks: [10, 3, 32, 47, [124], 94], register: 124
mOomOomOoMOOmoOMoomOoMOomoo # print n spaces							blocks: [10, [0], 32, 47, 124, 94], register: 124
MMMMoo	              # paste 124 to 2nd block and print as ASCII character			blocks: [10, [124], 32, 47, 124, 94], register: nil
```
[Answer]
# [Ruby](https://www.ruby-lang.org/), 36 bytes
```
->n{" #{?_*n}
/#{a=" "*n}\\
|#{a}|"}
```
[Try it online!](https://tio.run/##KypNqvyfZvtf1y6vWklBudo@XiuvlktfuTrRVklBCciOieGqAfJqa5Rq/2sY6OkZa@qlJiZnKFQr1OTVKBSUlhQrpEXnxSrU/gcA "Ruby – Try It Online")
[Answer]
# Scala, 47 bytes
```
n=>print(s" ${"_"*n}\n/${" "*n}\\\n|${" "*n}|")
```
## Longer version, 94 bytes
```
n=>print(Seq((' ',' ',"_"),('/','\\'," "),('|','|'," "))map(t=>t._1+t._3*n+t._2)mkString "\n")
```
[Try them in Scastie](https://scastie.scala-lang.org/GRW7wRwySaSQNaN7MrBcDA)
[Answer]
# [Haskell](https://www.haskell.org/), 58 bytes
```
f n|x<-' '<$[1..n]=' ':('_'<$x)++"\n/"++x++"\\\n|"++x++"|"
```
[Try it online!](https://tio.run/##y0gszk7Nyfn/P00hr6bCRlddQd1GJdpQTy8v1hbIttJQjwcKVGhqayvF5OkraWtXgFgxMXk1UHaN0v/cxMw8BVuF3MQC33gFjYLSkuCSIp88BT2FNE2FaAM9PePY/wA "Haskell – Try It Online")
[Answer]
# [C (gcc)](https://gcc.gnu.org/), ~~109~~ 91 bytes
Saved a whopping 18 bytes thanks to [ceilingcat](https://codegolf.stackexchange.com/users/52904/ceilingcat)!!!
```
#define p printf(L"| |\\ / _ "+i)
i;j;f(n){for(i=9;i--;i--,p,puts(""))for(i-=p,j=n;j--;)p;}
```
[Try it online!](https://tio.run/##LYxBCsIwEEX3OcUQNzO0QRduZMwNPEJBpG10CsZQKy7anD2mqQMDf97/f1pzb9uUdl3vxPcQIIziJ4cXvcDSNLCHK@hKSAkP7NDT7F4jij2xGLNuHerwmd6oNVGxjA31YD0P2afAMeV/8LyJR1Kzgjw5BrjSr3TTAywc@C/PcGSoqnIQbOnSwA1xIVHF9AM "C (gcc) – Try It Online")
[Answer]
# [Perl 5](https://www.perl.org/) `-p`, 40 bytes
```
say$"._ x$_,$/,$_='/'.$"x$_.'\\';y/ /|/c
```
[Try it online!](https://tio.run/##K0gtyjH9/784sVJFSS9eoUIlXkdFX0cl3lZdX11PRQnI11OPiVG3rtRX0K/RT/7/3/BffkFJZn5e8X9dX1M9A0OD/7oFAA "Perl 5 – Try It Online")
[Answer]
# [Husk](https://github.com/barbuz/Husk), 17 bytes
```
TJR⁰"_  "½" /| ¦|
```
[Try it online!](https://tio.run/##yygtzv7/P8Qr6FHjBqV4BQWlQ3uVFPRrFA4tq/n//78pAA "Husk – Try It Online")
## Explanation
```
TJR⁰"_  "½" /| ¦|   Input is a number, say n = 3, accessed via ⁰.
          " /| ¦|   String literal " /| \|".
                    The parser replaces ¦ by \ and the closing " is implicit.
         ½          Split in half: x = [" /|", " \|"]
    "_  "           String literal.
  R⁰                Repeat n times: y = ["_  ", "_  ", "_  "]
 J                  Join x by this list: [" /|", "_  ", "_  ", "_  ", " \|"]
                    Since x and y are lists of strings, y is inserted between
                    each pair of elements in x and the result is flattened
                    to keep the types consistent.
T                   Transpose: [" ___ ", "/   \", "|   |"]
                    Implicitly print, separated by newlines.
```
[Answer]
# [V (vim)](https://github.com/DJMcMayhem/V), 17 bytes
```
Àé_>>o/\Àé ÙÓÓ/|
```
```
Explain
À                  # @arg times
 é_                # <M-i>nsert a '_'
   >>              # indent by one space
     o/\           # insert '/\' on the next line (cursor stays at '\')
         Àé        # @arg times insert ' '
            Ù      # Duplicate this line down
             Ó /   # Find and replace ...
              Ó    # all Non-whitespace (\S == <M-S>)
                |  # with a '|'
```
Haven't done one of these in a while.
[Try it online!](https://tio.run/##K/v//3DD4ZXxdnb5@jHSIKbC4ZmHJx@erF/z//9/YwA "V (vim) – Try It Online")
[Answer]
# [MAWP v1.1](https://esolangs.org/wiki/MAWP), 92 bytes
```
%@_1A84W;[1A~25WWM~]%!![1A92W1M5W;]%67M;85W7M;[1A84W;]%45W3M4W;67M;65W1M4W;[1A84W;]65W1M4W;.
```
[Try it!](https://8dion8.github.io/?code=%25%40_1A84W%3B%5B1A%7E25WWM%7E%5D%25!!%5B1A92W1M5W%3B%5D%2567M%3B85W7M%3B%5B1A84W%3B%5D%2545W3M4W%3B67M%3B65W1M4W%3B%5B1A84W%3B%5D65W1M4W%3B.&input=0)
[Answer]
# 1+, 174 bytes
```
."11+""*"**;1^<#[#(?|11##11+"1+""*""*+++;1+"\"/<1+1<1+#)]11+"""**+;11+"1+""""*++*+;1^<11++#(|?)[#(|11##11+""*"**;1+"\"/<1+1<1+#)]11+"1+"*""*++;11+"""**+;11+"*""1+""*+*+";()/;
```
Don't ask me how this work, I don't know at all!
I didn't yet try to golf it down (although I probably can offer a 50% discount on the bytecount when I have time), and there's still a lot of repetitions. But at least I made it.
1+ 174 vs 92 MAWP v1.1. Fiasco.
[Answer]
# [Pepe](https://github.com/Soaku/Pepe), 118 bytes
```
REeEeEEEEErEeErREEeeeEReREEEEEEeRREeeEeeeeeReeereeEreeeEeEEEEREEEEeeEREEeeeEReeereeEeEEEeereeERrEeEEEEEeerreEeReeereEe
```
[Try it online!](https://soaku.github.io/Pepe/#!bzQ@_b.E5-!8hHIV2Dv_bHXkI-!dk@KHK%5D)
[Answer]
# MATLAB/[Octave](https://www.gnu.org/software/octave/), ~~36~~ 32 bytes
```
@(n)[' /|';'_  '+~(1:n)';' \|']'
```
[Try it online!](https://tio.run/##y08uSSxL/Z9mq6en999BI08zWl1Bv0bdWj1eQUFdu07D0CpPE8hTiKlRj1X/n5ZfpJBpa2BlaMClAAQpmcUFGmkamZqaXKl5Kf8B "Octave – Try It Online")
Simple anonymous function that stitches together the first column ( `/|`), `n` middle columns (`_` ), and the final column ( `\|`), then returns the result.
Because the strings are rows rather than columns, everything is stitched together vertically, and then the result is transposed to get the desired orientation.
This works as trailing spaces are allowed, so a fully populated matrix can be formed. If trailing spaces were disallowed, the code would be 6 bytes longer by wrapping the result in `trim(...)`.
---
* Saved 4 bytes by duplicating the string literal using array expansion rather than with `repmat`. Thanks @LuisMendo.
]