//汉诺塔
func hanoi(n:Int,A:String,B:String,C:String)
{
if(n==1){
println("Move sheet \(n) from \(A) to \(C)")
}
else
{
hanoi(n-1,A,C,B)
println("Move sheet \(n) from \(A) to \(C)")
hanoi(n-1,B,A,C)
}
}
hanoi(6,"XiAn","ShanHai","GuangDong")