Modify the input matrix mat [ ] using the first row and first column of Matrix mat
for ( int i = 1 ; i < mat . GetLength ( 0 ) ; i ++ ) { for ( int j = 1 ; j < mat . GetLength ( 1 ) ; j ++ ) { if ( mat [ 0 , j ] == 1 mat [ i , 0 ] == 1 ) { mat [ i , j ] = 1 ; } } }