Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- _HaNoiTower(10,'a','b','c')
- ShellExecute(@ScriptDir&'\output.txt')
- Func _HaNoiTower($n, $nguon, $tg, $dich)
- if $n = 1 Then
- _Move(1,$nguon,$dich)
- Else
- _HaNoiTower($n-1,$nguon,$dich ,$tg)
- _Move($n, $nguon, $dich)
- _HaNoiTower($n-1,$tg, $nguon , $dich)
- EndIf
- EndFunc
- Func _Move($n, $a, $b)
- FileWriteLine(@ScriptDir&'\output.txt','Di chuyen dia '&$n&' tu cot '&$a&' sang cot '&$b)
- EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement