I don't know anything about magic squares, but maybe this will help.
Your code without good indentation:
Code:
for (row = 0; row < size; row++)
for (column = 0; column < size; column++)
printf ("%4d\n", magic_square [row][column]);
printf ("\n");
Your code with good indentation:
Code:
for (row = 0; row < size; row++)
for (column = 0; column < size; column++)
printf ("%4d\n", magic_square [row][column]);
printf ("\n");
So, let's see:
Line 3: You are printing a newline out every time you print a value. That is why it's all appearing in one column.
Line 4: You are only printing a newline once here, when the row/column printing is done. Which means, instead of printing only in a vertical column, it will only print in a horizontal row. I think you meant to add some braces for the first "for()" loop, to encompass the last newline print.