вот код:
var a,b,c,d,e,min,max: integer;
begin
read (a,b,c,d,e);
if (a> b) and (a> c) and (a> d) and (a> e) then max: = a;
if (b> a) and (b> e) and (b> c) and (b> d) then max: = b;
if (c> a) and (c> b) and (c> d) and (c> e) then max: = c;
if (d> a) and (d> c) and (d> b) and (d> e) then max: = d;
if (e> b) and (e> a) and (e> d) and (e> c) then max: = e;
if (a< b) and (a< c) and (a< d) and (a< e) then min: = a;
if (b< a) and (b< e) and (b< c) and (b< d) then min= b;
if (c< a) and (c< b) and (c< d) and (c< e) then min: = c;
if (d< a) and (d< c) and (d< b) and (d< e) then min: = d;
if (e< b) and (e< a) and (e< d) and (e< c) then min: = e;
writeln ('минимальное число: ',min);
writeln ('максимальное число: ',max);
end.
вот код:
var a,b,c,d,e,min,max: integer;
begin
read (a,b,c,d,e);
if (a> b) and (a> c) and (a> d) and (a> e) then max: = a;
if (b> a) and (b> e) and (b> c) and (b> d) then max: = b;
if (c> a) and (c> b) and (c> d) and (c> e) then max: = c;
if (d> a) and (d> c) and (d> b) and (d> e) then max: = d;
if (e> b) and (e> a) and (e> d) and (e> c) then max: = e;
if (a< b) and (a< c) and (a< d) and (a< e) then min: = a;
if (b< a) and (b< e) and (b< c) and (b< d) then min= b;
if (c< a) and (c< b) and (c< d) and (c< e) then min: = c;
if (d< a) and (d< c) and (d< b) and (d< e) then min: = d;
if (e< b) and (e< a) and (e< d) and (e< c) then min: = e;
writeln ('минимальное число: ',min);
writeln ('максимальное число: ',max);
end.