Computer Science, asked by triptichoubey4923, 10 months ago

How to write a c program for towers of Hanoi?

Answers

Answered by Anonymous
1

Answer:

C Program to Solve Tower-of-Hanoi Problem using Recursion

* C program for Tower of Hanoi using Recursion.

void towers(int, char, char, char);

int num;

printf("Enter the number of disks : ");

scanf("%d", &num);

printf("The sequence of moves involved in the Tower of Hanoi are :\n");

towers(num, 'A', 'C', 'B');

return 0;

[I hope help]

Similar questions