knyazer

Untitled

Dec 17th, 2019
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.46 KB | None | 0 0
  1. type
  2.   arrayType = array[1..n] of integer;
  3.   array2D = array[1..n] of arrayType;
  4.  
  5. var
  6.   arr : array2D;
  7.   i, j : integer;
  8.   max : integer;
  9.   coordI, coordJ : integer;
  10.  
  11. begin  
  12.   for i := 1 to n do for j := 1 to n do readln(arr[i][j]);
  13.  
  14.   for j := 1 to n do for i := 1 to n do
  15.   begin
  16.    if (arr[i][j] > max) then
  17.    begin
  18.     coordI := i;
  19.     coordJ := j;
  20.     max := arr[i][j];
  21.    end
  22.   end;
  23.  
  24.   writeln(coordI);
  25.   writeln(coordJ);0
  26.  
  27. end.
Advertisement
Add Comment
Please, Sign In to add comment