mirror of
https://github.com/TheAlgorithms/C
synced 2024-11-22 05:21:49 +03:00
Added Algorithm for Tower of Hanoi
This commit is contained in:
parent
dbe89ab930
commit
4377477d9e
@ -2,6 +2,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
// Function for Tower of Hanoi algorithm
|
||||
void hanoi(int noOfDisks,char where,char to,char extra){
|
||||
if(noOfDisks == 0 )
|
||||
{
|
||||
@ -25,4 +26,4 @@ int main(void){
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user