program bai1;
var a:array[1..5] of longint;
max,min,i:longint;
begin
for i:=1 to 5 do
begin
write('A[',i,']= ');
readln(a[i]);
end;
max:=a[1];min:=a[1];
for :=1 to 5 do
begin
if max<a[i] then max:=a[i];
if min>a[i] then min:=a[i];
end;
writeln('So tu nhien lon nhat la ',max);
writeln('So tu nhien nho nhat la ',min);
readln
end.
Program min_max;
uses crt;
var
min,max,i,j:integer; a:array[1..5] of integer;
begin
assign(fin,'MINMAX.INP');
reset(fin);
for i:=1 to 5 do read(fin,a[i]);
close(fin);
assign(fout,'MINMAX.OUT');
rewrite(fout);
min:=a[1];
for i:=2 to 5 do
if (min>a[i]) then min:=a[i];
max:=a[1];
for i:=2 to 5 do
if (max<a[i]) then max:=a[i];
writeln(fout,min); write(fout,max);
close(fout);
end.