本文实例讲述了JavaScript汉诺塔问题解决方法。分享给大家供大家参考。具体实现方法如下:
0){
han(disc-1,dst,aux);
document.writeln("move disc "+disc+" from "+src+" to "+dst+"
"); han(disc-1,dst); } }; han(10,"src","aux","dst");
"); han(disc-1,dst); } }; han(10,"src","aux","dst");
希望本文所述对大家的javascript程序设计有所帮助。
原文链接:https://www.f2er.com/js/54661.html