Advertisement
vov44k

Untitled

Jan 12th, 2022
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.49 KB | None | 0 0
  1.         int minI = 0, minJ = 0, min = a[0][0];
  2.         int maxI = 0, maxJ = 0, max = a[0][0];
  3.         for (int i = 0; i < n; i++)
  4.             for (int j = 0; j < m; j++) {
  5.                 if (a[i][j] < min){
  6.                     minI = i;
  7.                     minJ = j;
  8.                     min = a[i][j];
  9.                 }
  10.                 if (a[i][j] > max){
  11.                     maxI = i;
  12.                     maxJ = j;
  13.                     max = a[i][j];
  14.                 }
  15.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement