For starters, change the first 'println()' to 'print()'. That will remove the linefeed from between each number in a row.

Good luck!