Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const n = 4;
- var a: array[1..n,1..n] of real;
- i,j,imax,jmax: integer;
- begin
- randomize;
- for i := 1 to n do
- begin
- for j := 1 to n do
- begin
- a[i,j] := random(5);
- write(a[i,j]:2)
- end;
- writeln
- end;
- writeln;
- imax := 1; jmax := 1;
- for i := 1 to n do
- for j := 1 to n+1-i do
- if a[i,j] > a[imax,jmax] then
- begin
- imax := i;
- jmax := j;
- end;
- writeln(a[imax,jmax]:2)
- end.
Advertisement
Add Comment
Please, Sign In to add comment