题目: |
procedure f(a,b,c:integer);
begin
write(a,b,c,'/');
if (a=3)and(b=2)and(c=1) then exit;
if (b<c) then f(a,c,b)
else
if a<b then
if a<c then f(c,a,b) else f(b,c,a);
end;
var a,b,c:integer;
begin
readln(a,b,c);
f(a,b,c);
end.
输入:1 3 2 输出:132/213/231/312/321/
|