Lời giải :
program hotrotinhoc ;
var a: array[1..5] of integer ;
i,SLN : integer ;
begin
writeln('Nhap gia tri cua cac phan tu ');
for i:= 1 to 5 do
begin
write('a[',i,']='); readln(a[i]);
end;
SLN:= a[1];
for i:= 2 to 5 do
if SLN < a[i] then SLN:=a[i];
write('So lon nhat trong 5 phan tu la :',SLN);
readln
end.