正在加载图片...
[Example] Matrix addition void add (int all[ MAX SIze, int b][ MAX SIzE1, int CLI[ MAX SIZE, int rows, int cols for(i=0; i< rows; i++)/*rows+1*/ for(j=0; j< cols; j++)/*rows(cols+1)*/ c[i]j]=a[i[j]+bi]j]; /*rows. cols * T(rows, cols )=2 rows cols rows+ 1〖Example〗 Matrix addition void add ( int a[ ][ MAX_SIZE ], int b[ ][ MAX_SIZE ], int c[ ][ MAX_SIZE ], int rows, int cols ) { int i, j ; for ( i = 0; i < rows; i++ ) for ( j = 0; j < cols; j++ ) c[ i ][ j ] = a[ i ][ j ] + b[ i ][ j ]; } /* rows + 1 */ /* rows(cols+1) */ /* rows  cols */ T(rows, cols ) = 2 rows  cols + 2rows + 1
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有