Advertisement
iocoder

Towers of Hanoi Simulation

Dec 15th, 2012
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.63 KB | None | 0 0
  1. Enter number of discs: 3
  2. In the beginning:
  3.  
  4. | | |
  5. === | |
  6. ===== | |
  7. ======= | |
  8. ^^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^
  9. Step 1: Moving disc #1 from a to c
  10.  
  11. | | |
  12. | | |
  13. ===== | |
  14. ======= | ===
  15. ^^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^
  16. Step 2: Moving disc #2 from a to b
  17.  
  18. | | |
  19. | | |
  20. | | |
  21. ======= ===== ===
  22. ^^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^
  23. Step 3: Moving disc #1 from c to b
  24.  
  25. | | |
  26. | | |
  27. | === |
  28. ======= ===== |
  29. ^^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^
  30. Step 4: Moving disc #3 from a to c
  31.  
  32. | | |
  33. | | |
  34. | === |
  35. | ===== =======
  36. ^^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^
  37. Step 5: Moving disc #1 from b to a
  38.  
  39. | | |
  40. | | |
  41. | | |
  42. === ===== =======
  43. ^^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^
  44. Step 6: Moving disc #2 from b to c
  45.  
  46. | | |
  47. | | |
  48. | | =====
  49. === | =======
  50. ^^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^
  51. Step 7: Moving disc #1 from a to c
  52.  
  53. | | |
  54. | | ===
  55. | | =====
  56. | | =======
  57. ^^^^^^^^^ ^^^^^^^^^ ^^^^^^^^^
  58. Total steps: 7
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement