Пример #1
0
    //and at last we will have to use our Hanoi Class to juggle?!
    //coded and solved by mohammad safari!:\
    static void Main(string[] args)
    {
        Console.WriteLine("\nEnter disk numbers, please:");
        //told that cap is important:\
        //(may be not that important, just my gut feelings:|)
        int n = Convert.ToInt32(Console.ReadLine());

        Hanoi.set_disk_num(n);
        Hanoi.initialize_Hanoi(Hanoi.A);
        Hanoi.Solve_Iterative(Hanoi.A, Hanoi.B, Hanoi.C);
        //da dan...!:)
        //by m. safari
        //hope you enjoy!
        //only for comparison:
        //Hanoi.Solve_Recursive(n);
        //p.s : recursive one only lack disk num that we can
        //perform it by arrays that i thought might not be
        //necessary for comparing
    }