using the formula to generate hilbert matrix
H [ i ] [ j ] = ( float ) 1.0 / ( ( i + 1 ) + ( j + 1 ) - 1.0 ) ; } } for ( int i = 0 ; i < n ; i ++ ) { for ( int j = 0 ; j < n ; j ++ ) cout << H [ i ] [ j ] << " ▁ " ; cout << endl ; } }