This is definitely interesting. I won't give you the solution, but here's some ideas to help you get started.
Ideally, you'd want to start from left to right. However, printing to the screen doesn't work that way. Therefore, I'd suggest creating a 2D array, each cell of which represents a single output character. A character can therefore be one of: " " , /, \, <, >, |, or o.
The hardest part probably is figuring out how many rows and columns that array should have based on the input. Once you've done that, you can simply run loops going from left to right (increasing column order) and add the required characters to each column.
2
u/sentles Aug 13 '21 edited Aug 13 '21
This is definitely interesting. I won't give you the solution, but here's some ideas to help you get started.
Ideally, you'd want to start from left to right. However, printing to the screen doesn't work that way. Therefore, I'd suggest creating a 2D array, each cell of which represents a single output character. A character can therefore be one of:
" ",/,\,<,>,|, oro.The hardest part probably is figuring out how many rows and columns that array should have based on the input. Once you've done that, you can simply run loops going from left to right (increasing column order) and add the required characters to each column.
Good luck!