var a, b, c, max, min, mid:integer;
begin
writeln('Напишите 3 числа');
readln(a, b, c);
if (a>b)and(a>c) then max:=a;
else
if (b>a)and(b>c) then max:=b
max:=c;
if (a<b)and(a<c) then min:=a;
if (b<a)and(b<c) then min:=b
min:=c;
if ((a>b)and(a<c))or((a<b)and(a>c)) then mid:=a;
if ((b<a)and(b>c))or((b>a)and(b<c)) then mid:=b
mid:=c;
writeln(max, mid, min);
end.
function Max(a, b, c: integer): integer;
var
m: integer;
if a > b then
m := a
m := b;
if c > m then
m := c;
Max := m;
end;
function Min(a, b, c: integer): integer;
if a < b then
if c < m then
Min := m;
procedure Swap(var a, b: integer);
t: integer;
t := a;
a := b;
b := t;
a, b, c, t: integer;
Write('Введи через пробел три числа: ');
Read(a, b, c);
Writeln('Max = ', Max(a, b, c), ', min = ', Min(a, b, c));
if b > a then
Swap(a, b);
if c > b then
Swap(b, c);
Writeln(a, ' ', b, ' ', c);
var a, b, c, max, min, mid:integer;
begin
writeln('Напишите 3 числа');
readln(a, b, c);
if (a>b)and(a>c) then max:=a;
else
if (b>a)and(b>c) then max:=b
else
max:=c;
if (a<b)and(a<c) then min:=a;
else
if (b<a)and(b<c) then min:=b
else
min:=c;
if ((a>b)and(a<c))or((a<b)and(a>c)) then mid:=a;
else
if ((b<a)and(b>c))or((b>a)and(b<c)) then mid:=b
else
mid:=c;
writeln(max, mid, min);
end.
function Max(a, b, c: integer): integer;
var
m: integer;
begin
if a > b then
m := a
else
m := b;
if c > m then
m := c;
Max := m;
end;
function Min(a, b, c: integer): integer;
var
m: integer;
begin
if a < b then
m := a
else
m := b;
if c < m then
m := c;
Min := m;
end;
procedure Swap(var a, b: integer);
var
t: integer;
begin
t := a;
a := b;
b := t;
end;
var
a, b, c, t: integer;
begin
Write('Введи через пробел три числа: ');
Read(a, b, c);
Writeln('Max = ', Max(a, b, c), ', min = ', Min(a, b, c));
if b > a then
Swap(a, b);
if c > b then
begin
Swap(b, c);
if b > a then
Swap(a, b);
end;
Writeln(a, ' ', b, ' ', c);
end.