focalдbasicfortran
0101chanoibydec
0102cfrorogragnguages
0103cstchange:8771
0104
0105cthisrograiththetowersofhanoiroble
0106cyouaregiventhreetoithvariosizeddiscson
0107neofthetheobjectisceallthediscson
0108canothertoweronatati,withthestiutionthata
0109crgerdisayneverbeonofasallerohis
0110crograisgoodforanynuberofdiscsandcanberun
0111ceitheranual(youtelliheretoove)orautoatic
0112odeiillsoexitsovesordrawtheforyou,
0113cdeendgonhowyouanswertheovesorlotsestion
0114utdiscisthedisc(1on)thatyouwanttoove
0115cdiscistheosition(1on)whereyouoveto
0116uttoweristhetower(1onleft)frowhichyouove
0117ctoweristhetower(3onright)youoveto
0118cthisrograassusnocheatg,anddoesnotcheckforit
0119
0129e
0130a”noofdisks”n,!
0140fi=1,nsss(i)=i
0150sso=1ssi=3
0160sno=nsni=nsi=0
0170a”ovesorlots”,ove,!
0180i(fabs(o0oves)),185d23
&nb
游戏汉诺塔源代码[1/2页]