package main
import "fmt"
func hanoi(disks int, src string, dest string, aux string) {
if (disks > 0) {
hanoi(disks - 1, src, aux, dest)
fmt.Println("Move disk from", src, "to", dest)
hanoi(disks - 1, aux, dest, src)
}
}
func main() {
disks := 2
fmt.Println("Using", disks, "disk/s")
hanoi(disks, "A", "C", "B")
}
To embed this project on your website, copy the following code and paste it into your website's HTML: