1个回答
2015-07-16
展开全部
hanoi(n-1,one,three,two);
move(one,three);
hanoi(n-1,two,one,three);
}
}
public static void move(char x,char y)
{
System.out.print(x);
System.out.print("-->");
System.out.println(y);
}
}
move(one,three);
hanoi(n-1,two,one,three);
}
}
public static void move(char x,char y)
{
System.out.print(x);
System.out.print("-->");
System.out.println(y);
}
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询