Translate

Labels

Showing posts with label TOWER OF HANOI. Show all posts
Showing posts with label TOWER OF HANOI. Show all posts

Thursday, 13 June 2013

PROGRAM TO SOLVE TOWER OF HANOI PROBLEM

main()
{
int source,destination,other,nodisks;
printf("Enter the number of disks:\n");
scanf("%d",&nodisks);
if(nodisks<1)
{
printf("Illegal input\n");
exit(1);
}
source=1;
other=2;
destination=3;