0
uses wincrt;
var
a:array[1..5,1..5] of byte;
x,i,j,Mak,Min:integer;
begin
clrscr;
write('berapa jumlah data? ' );readln(x);
for i:=1 to x do
for j:=1 to x do
begin
write('masukkan data ke ',i,',',j,'= ');readln(a[i,j]);
end;
Mak:= a[i,j];
Begin
For i :=1 to x do
For j :=1 to x do
If a[i,j]> Mak then
Begin
Mak:= a[i,j];
End;
Min:= a[i,j];
Begin
For i :=1 to x do
For j :=1 to x do
If a[i,j]< Min then
Begin
Min:= a[i,j];
End;End;End;
for i:=1 to x do
begin
for j:=1 to x do
write(a[i,j]:13);
writeln;
end;
writeln;
Writeln('nilai Tertinggi : ',Mak);
Writeln('nilai Terendah : ',Min);
writeln;
end.