+ 2
int* rowsum(int** mat, int r, int c) { int * rs = new int[r]; for(int i=0;i<r;i++) { rs[i] = 0; for(int j=0; j<c; j++) { rs += mat[i][j]; } } return rs; }
4th Jan 2018, 4:22 PM
Solo Wanderer 4315
Solo Wanderer 4315 - avatar