TurboC

Users questions: Seeking the largest element in two-dimensional array, and displays the line number where the largest element and the column number. Completed the main function to send the value of array elements, function max_value () to achieve the greatest demand in the array elements, the maximum element value stored in max.
Experts answer: # include "std io.h "# defineM100 # defineN100intmax_value (INTA [] [N], introws, intcols, int * pr, int * pc) (core, j, max = a [0] [0]; *pr=*pc=0;for(i=0;i rows;i++){for(j=0;j cols;j++){if(max a[i][j])max=a[i][j];*pr=i;*pc=j;}}returnmax & Rows); printf ("colscount (maxvalue =% d):", N), scanf ("% d", & cols); for (i = 0; i rows; i + +) (for (j = 0, j cols; j + +) (Printf ("(% d,% d):", i, j) scanf ("% d", & a [i] [j ]);}}** getmaxvaluemax MAX_VALUE = (a, rows, cols, r & , & c); ** Outpu
  • This information provided by the users.Thanks!