Php > Miscellaneous
Hanoi Towers
Hanoi Towers function hanoi($n,$s,$i,$d) { if($n==1) print("
move from $s to $d"); else { hanoi($n-1,$s,$d,$i); print("
move from $s to $d"); hanoi($n-1,$i,$s,$d); } } hanoi(5,"1","2","3"); ?>
Php Codes
Algorithms
Arrays
Authentication
Calendar
Code Snippets
Programs
Content Manage
Contest Related
Cookies
Credit Cards
DBase Related
Databases
Date Time
Directories
E-Mail
Errors
File
File System
Forms
Handling
Graphics
HTML and PHP
Informix
Ingres
InterBase
LDAP
Look and Feel
Miscellaneous
MySQL
Other
PHP Classes
Searching
Navigation
Statistics
Strings
User Manage