Т.к уточнений нет, то написал на Pascal самым простеньким методом.
Проверьте всё ли тут, что требуется.
var
a,b,c,d,f,g:integer;
begin
writeln('Входные данные');
readln(a,b,c);
if (a<b) and (a<c) then
d:=a;
if (b<a) and (b<c) then
d:=b;
if (c<b) and (c<a) then
d:=c;
if (a>b) and (a>c) then
g:=a;
if (b>c) and (b>a) then
g:=b;
if (c>b) and (c>a) then
g:=c;
if (a>d) and (a<g) then
f:=a;
if (b>d) and (b<g) then
f:=b;
if (c>d) and (c<g) then
f:=c;
writeln('Результат работы');
writeln(d+' '+f+' '+g);
end.