This challenge uses the '+' character
Charcoal, 5 bytes
P+×+N
Try it online!
Python 2, 53 bytes
n=2*input()-1;C='+'.center
for c in C(n):print C(n,c)
Try it online!
JavaScript (ES6), 67 65 63 60 59 bytes
x=>(v=(` `[r=`repeat`](--x)+`+
`)[r](x))+`+`[r](x*2)+`+
`+v;
- 2 bytes saved by replacing two occurrences of
x-1
, the first with--x
and the second withx
. - 2 bytes saved thanks to Kritixi Lithos, replacing
"\n"
with`[newline]`
. - 3 bytes saved thanks to user2428118, finally helping me to figure out a way to alias the
repeat
in a way that reduced the size. (With honourable mention to Marie for her efforts, too) - 1 byte saved indirectly thanks to Herman.
Try It
f=
x=>(v=(` `[r=`repeat`](--x)+`+
`)[r](x))+`+`[r](x*2)+`+
`+v;
oninput=_=>o.innerText=f(+i.value)
o.innerText=f(i.value=3)
<input id=i min=1 type=number><pre id=o>