diff --git a/Tower Of Hanoi.cpp b/Tower Of Hanoi.cpp new file mode 100644 index 0000000..9284c38 --- /dev/null +++ b/Tower Of Hanoi.cpp @@ -0,0 +1,30 @@ +#include +using namespace std; + +//tower of HANOI function implementation +void TOH(int n,char A, char B,char C) +{ + if(n==1) + { + cout<<"Move Disk "<>n; + //calling the TOH + TOH(n,'A','B','C'); + + return 0; +} +