Var a,min,max,i:integer
t1,t2:text;
begin
assign(t1,'in.txt');
reset(t1);
read(t1,min);
max:=min;
for i:=1 to 4 do
begin
read(t1,a);
if a if a>max then max:=a;
end;
close(t1);
assign(t2,'out.txt');
rewrite(t2);
writeln(t2,min);
writeln(t2,max);
close(t2);
end.
Пример:
in.txt:
5 2 9 7 3
out.txt:
2
9