Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ' Gambas class file
- Public Sub _new()
- End
- Public Sub Form_Open()
- End
- Public Sub ButtonSolucion_Click()
- resuelve(ValueBoxFichas.Value, 1, 3, 2)
- End
- Public Sub resuelve(n As Integer, inicial As Integer, final As Integer, libre As Integer)
- If n = 1 Then
- TextAreaSolucion.text &= "Mover disco superior de aguja " & Str$(inicial) & ", a " & Str$(final) & gb.Cr
- Else
- resuelve(n - 1, inicial, libre, final)
- TextAreaSolucion.text &= "Mover disco superior de aguja " & Str$(inicial) & ", a " & Str$(final) & gb.Cr
- resuelve(n - 1, libre, final, inicial)
- Endif
- End
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement