I have no idea about tower of hanoi. I want to write a program on this using recursion.
Hmm... Google?
In all seriousness, you've not given us a lot to go on.
Another homework assignment. Pass your teacher's A to me ;) http://www.dcs.napier.ac.uk/~cs66/hanoi/rechelp.html
Here is a compact implementation in Lisp: http://www.kernelthread.com/projects/hanoi/html/gcl.html. It is certainly recursive, but I did not verify it's correctness.
The Structure and Interpretation of Computer Programs video lectures contain helpful tips on solving this problem and a wealth of knowledge besides.
From WikiPedia:
The Tower of Hanoi or Towers of Hanoi (also known as The Towers of Brahma) is a mathematical game or puzzle. It consists of three rods, and a number of disks of different sizes which can slide onto any rod. The puzzle starts with the disks neatly stacked in order of size on one rod, the smallest at the top, thus making a conical shape.
Check out the recursive solution.