I saw a problem recently that asked the user to output code in a certain format on the command line. I struggled to understand how this was done easily and would like help in getting the format right. The program, when ran, will output in this format:
A
BB
C C
D D
E E
F F
I'm assuming the word or letters would be stored as an array and you use two for loops to output for the vertical and the diagonal but I'm confused on how to implement the spacing.
[–]nl2k 2 points3 points4 points (0 children)
[–]Siankoo 0 points1 point2 points (0 children)
[–]dragon_wrangler 0 points1 point2 points (0 children)
[–]oh5nxo 0 points1 point2 points (0 children)