\ x x /

x \ / x

x / \ x

/ x x \

And there is a simple way to do it, with just two loops and a couple of

`if`

s.Think about what you are doing: for each row you print, the column with the same number as the row should be a '/'.

And the column with the same number as the N minus the row number should be a '\', where N is the number of rows (minus one if you start with row and column zero).

All the other characters are 'X'.

So have a loop for each row, and a nested loop for each column in the row, and use an

`if ... else if ... else`

inside the loop to decide which character to print.Try it on paper and you'll see what I mean.