So i need to create an array of square values and I need to be able to also label the rows and columns with numbers 0-9. The calculated values need to be 10x10 which they are but i'm struggling with how to figure out how to label the rows and columns without screwing up the formatting of the rest of the array. I listed how the rows should be labeled and made it a 11x11 array to just include those value into the array.
Thanks for the help.
The loops on lines 45 and 48 should start from 0, not 1; otherwise your program is fine except for array[0][0] which is handled in an implementation dependent way: http://coliru.stacked-crooked.com/a/807b820c784fb090
clang sets [0][0] to 0 but gcc reads some garbage value
You could also take the row and column headers out of your container, have a 10X10 array and print around the edges: http://coliru.stacked-crooked.com/a/d37913ed473d56b5