Based on the interpretation user @ThePirateBay made from the first version of my own challenge
Output diagonal positions of me squared
now I challenge you to make ASCII art that draws diagonal lines based on a square character matrix based on a given number n
.
Input
A number n.
Output
A square matrix of size n^2
which outputs diagonals represented by the adequate one of the \ X /
chars. All other positions are to be fulfilled with #
chars.
Examples:
1
X
2
\/
/\
3
\#/
#X#
/#\
4
\##/
#\/#
#/\#
/##\
5
\###/
#\#/#
##X##
#/#\#
/###\
There will be no accepted answer. I want to know the shortest code for each language.
X
in the middle if input is odd and each line in the bigX
is as long as input, not double the size. I think it's not a dupe. \$\endgroup\$ – totallyhuman Aug 30 '17 at 22:51"\/X "
, e.g This \$\endgroup\$ – H.PWiz Aug 31 '17 at 0:59