बिजनेस मार्केटिंग का लो कॉस्ट फंडा , अपने मोबाइल से ऑटो sms भेजकर मार्केटिंग करे विजिट करे http://autotextsms.com/ बिजनेस मार्केटिंग का लो कॉस्ट फंडा http://autotextsms.com/

Search This Blog

Translate

Showing posts with label tower of hanoi in c without recursion. Show all posts
Showing posts with label tower of hanoi in c without recursion. Show all posts

Tower Of Hanoi c program

tower of hanoi in c explanation
tower of hanoi in c without recursion
tower of hanoi in c using stack
tower of hanoi algorithm in data structure
tower of hanoi using stack
tower of hanoi in c++
tower of hanoi in c using iteration
tower of hanoi program in java



Tower Of Hanoi Using Backtracking in c++ program 

#include<iostream.h>
#include<conio.h>
void tower(int,char,char,char);
void main()
{
int n;
clrscr();
cout<<"enter the disk number :  ";
cin>>n;tower(n,'A','C','B');
getch();
}
void tower(int n,char from,char to,char aux)
{
if(n==1)
    {
    cout<<endl<<"move 1 from peg "<<from<<" to "<<to;return;
   }
tower(n-1,from,aux,to);
cout<<endl<<"move "<<n<<" from peg "<<from<<" to "<<to;
tower(n-1,aux,to,from);
}


Tower Of Hanoi c program  

  • tower of hanoi in c explanation
  • tower of hanoi in c without recursion
  • tower of hanoi in c using stack
  • tower of hanoi algorithm in data structure
  • tower of hanoi using stack
  • tower of hanoi in c++
  • tower of hanoi in c using iteration
  • tower of hanoi program in java



C Program example List