long getsum(int array[][]) //返回总和{ long total = 0; if (array == **) return -1; for(int i = 0; i < 5; i++) for(int j = 0; j < 5; j++) total += array[i][j]; return total;} long getrowsum(int array[][], int row) //返回某行的总和{ long total = 0; if (row < 1 || row > 5 || array == **) //行号位于[1,5] return -1; for(int i = 0; i < 5; i++) total += array[row - 1][i]; return total;} long getlinesum(int array[][], int line) //返回某列的总和{ long total = 0; if (line < 1 || line > 5 || array == **) //列号位于[1,5] return -1; for(int i = 0; i < 5; i++) total += array[i][line - 1]; return total;} 20210311