Thread: Hanoi tower

  1. #1
    Unregistered
    Guest

    Unhappy Hanoi tower

    Hey guys, I need help with a hanoi tower problem... anyone there that can help me? I have the main function but need some of the rest of it. please let me know if you can help me. thanks
    here is the main function... I need the rest.


    int main()
    {
    int num_disk, dest;
    int disk[30];
    GetDisk(num_disk);
    GetPosition(num_disk, disk);
    GetDest(dest);
    move(num_disk, dest, disk);
    }


    I also need the number of disks to be user input and the positions of the disks to be user input also.... it should print out like 3 --> 1 when position three goes to one and things like that. If anyone has a question feel free to ask, I might know. thanks again! my email address is [email protected] if you can help me. thanks.

  2. #2
    Registered User
    Join Date
    Feb 2002
    Posts
    51
    Have you even tried to build the functions? If so, let us see.

  3. #3
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Google is your friend.

    Quzah.
    Hope is the first step on the road to disappointment.

  4. #4
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >here is the main function... I need the rest.
    This is a tricky way of pretending that you've done some work. Unfortunately for you, we know that when doing the towers of hanoi problem, students are first given the driver and told to write the rest of the program. So let's see some effort on your part and then we'll be more helpful.

    -Prelude
    My best code is written with the delete key.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Tower of Hanoi
    By dmkanz07 in forum C Programming
    Replies: 13
    Last Post: 03-29-2007, 12:37 PM
  2. towers of hanoi problem
    By aik_21 in forum C Programming
    Replies: 1
    Last Post: 10-02-2004, 01:34 PM
  3. Little Problem on Presentation in the Tower of Hanoi
    By momegao in forum C++ Programming
    Replies: 3
    Last Post: 04-20-2003, 06:22 PM
  4. Tower of Hanoi
    By carrja99 in forum C++ Programming
    Replies: 2
    Last Post: 02-09-2003, 12:15 PM
  5. Tower Of Hanoi
    By Unregistered in forum C Programming
    Replies: 7
    Last Post: 12-18-2001, 11:12 PM