Function to prlet the matrix
function prletMatrix ( mat , N ) { for ( let i = 0 ; i < N ; ++ i ) { for ( let j = 0 ; j < N ; ++ j ) { document . write ( mat [ i ] [ j ] + " " ) ; } document . write ( " " ) ; } }