If you look at different ascii char's, you may find one's you like a lot better. Anyway:
There's a zillion ways to do this, Kennedy's suggestion of using the width modifier in printf(), is VERY good. Just "take control" of where the cursor is on the page. You want it to print something there - you tell it. You want it to move to the next column, you tell it to print a space char (ascii 32).
If you post up your code, we can help a lot more.
for a 2D array, I usually use something like this, in pseudocode:
Code:
print the Grid header
print a string of '=' to separate it from the grid printout below
then
for(row = 1 row < MaxRow r++) {
for(col = 1 col < MaxCol col++) {
print left margin of spaces (char 32)
print left column of IDentifiers
print a space
print a row of top markers for your first row
print newline
print left side vertical sqr separator
print a row of array contents, between each
subscript value, print a sqr separator (maybe a vertical line)
print a newline '\n'
} /* end of for col... */
} /* end of for row... */
That should get you going.
Note: When I'm printing a grid, I frequently want it to start with the 1 row, not the zero row. You do it as seems best to you.
Adak