Hot Search : Source embeded web remote control p2p game More...
Location : Home Downloads SourceCode Other ELanguage
  • Category : ELanguage
  • Tags :
  • Update : 2012-11-26
  • Size : 190kb
  • Downloaded :0次
  • Author :米***
  • About : Nobody
  • PS : If download it fails, try it again. Download again for free!
Download1 Download2
Don't use download software fo downloading.
If download fail,Try it again for free.
Introduction - If you have any usage issues, please Google them yourself
(n阶Hanoi塔问题)假设有三个分别命名为A、B、C的塔座,在塔座A上插有n(n<20)个直径大小各不相同、依小到大编号为1,2,…,n的圆盘。现要求将A轴上的n个圆盘移至塔座C上并仍按同样顺序叠排,圆盘移动时必须遵循下列规则: 1)每次只能移动一个圆盘; 2)圆盘可以插在A、B、C中的任一塔座上; 3)任何时刻都不能将一个较大的圆盘压在较小的圆盘之上。 请通过编程来打印出移动的步骤. Input 只有一组输入数据.输入数据N( 表示在开始时A塔座上的盘子数),当输入0时程序结束. Output 输出移动的步骤.如"A-->C","A-->B"等.每两的步骤之间有三个空格隔开,每输出5个步骤就换行.详细的见Sample Output. Sample Input 5 2 0 Sample Output A-->C A-->B C-->B A-->C B-->A B-->C A-->C A-->B C-->B C-->A B-->A C-->B A-->C A-->B C-->B A-->C B-->A B-->C A-->C B-->A C-->B C-->A B-->A B-->C A-->C A-->B C-->B A-->C B-->A B-->C A-->C A-->B A-->C B-->C
Packet file list
(Preview for download)
Hanoi.cpp
Debug\Hanoi.exe
.....\Hanoi.ilk
.....\Hanoi.obj
.....\Hanoi.pch
.....\Hanoi.pdb
.....\vc60.idb
.....\vc60.pdb
Debug
Related instructions
  • We are an exchange download platform that only provides communication channels. The downloaded content comes from the internet. Except for download issues, please Google on your own.
  • The downloaded content is provided for members to upload. If it unintentionally infringes on your copyright, please contact us.
  • Please use Winrar for decompression tools
  • If download fail, Try it againg or Feedback to us.
  • If downloaded content did not match the introduction, Feedback to us,Confirm and will be refund.
  • Before downloading, you can inquire through the uploaded person information

Nothing.

Post Comment
*Quick comment Recommend Not bad Password Unclear description Not source
Lost files Unable to decompress Bad
*Content :
*Captcha :
CodeBus is the largest source code store in internet!
Contact us :
1999-2046 CodeBus All Rights Reserved.