>361
とりあえず
4行目int array[n][n]をint *array
8行目for ( int j = 0; m < 10; j++ ) を( int j = 0; j < n; j++ )
10行目cout << array[i][j] << " "; をcout << array[i+n*j] << " ";
かな.....あとは大きいお友達に聞いてくれ。