Răspuns:
program ordonare;
var a,b,c,t:integer;
procedure ord3(var a,b,c:integer);
begin
if a>b then begin t:=a; a:=b; b:=t; end;
if a>c then begin t:=a; a:=c; c:=t; end;
if b>c then begin t:=b; b:=c; c:=t; end;
end;
begin
write('a='); read(a);
write('b='); read(b);
write('c='); read(c);
ord3(a,b,c);
writeln(a,' ',b,' ',c);
end.
Explicație: