document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. \' Gambas class file
  2.  
  3. Public Sub _new()
  4.  
  5. End
  6.  
  7. Public Sub Form_Open()
  8.  
  9. End
  10.  
  11. Public Sub ButtonSolucion_Click()
  12.  
  13.   resuelve(ValueBoxFichas.Value, 1, 3, 2)
  14.  
  15. End
  16.  
  17. Public Sub resuelve(n As Integer, inicial As Integer, final As Integer, libre As Integer)
  18.  
  19.   If n = 1 Then
  20.     TextAreaSolucion.text &= "Mover disco superior de aguja " & Str$(inicial) & ", a " & Str$(final) & gb.Cr
  21.   Else
  22.     resuelve(n - 1, inicial, libre, final)
  23.     TextAreaSolucion.text &= "Mover disco superior de aguja " & Str$(inicial) & ", a " & Str$(final) & gb.Cr
  24.     resuelve(n - 1, libre, final, inicial)
  25.   Endif
  26.  
  27. End
');